filter field

(from github.com/AdeelIlyas2014)
is there any additional fields besides label for filtering search records.

I need additional filter to filter records within label filtered records. I mean double filter.

Thanks

(from github.com/marevol)
You can add any fields.
To use additional fields for a search condition, it needs to be added to query.additional.search.fields in fess_config.properties as below.

query.additional.search.fields=filtername

(from github.com/AdeelIlyas2014)
then I can simply pass those parameters. Please give example from json service call.

Thanks.

(from github.com/AdeelIlyas2014)
You help / example will be really help Sir.

(from github.com/marevol)
q request parameter is like …?q=WORD+filtername:FILTER

(from github.com/AdeelIlyas2014)
some more questions. will this filter reside in indexes and how we will provide this filter with values for categorization. Then so that we can use in search later?. Will it be part of json schema like “content” field.
if not let me know how can I include another field in json schema “filterstr” etc and use that as filter through json service.

(from github.com/AdeelIlyas2014)
@marevol

I have added the entry query.additional.search.fields=filtercategory

in the said conf file of fess.

further I have before added new field in the mapping through this command:

curl -XPUT ‘http://domain.com/admin/server_bcdba46911f540ebae5024df00084edc/web/_mapping/doc’ -d ‘{“properties”: {“filtercategory”: {“type”: “string”,“index”: “not_analyzed”}}}’

also XPUT some new indexes with populating all fields incl. filtercategory and label as well
But still I am not able to search through this url:

http://domain.com/json/?q=(abcde) AND (label: “asposeapi”) AND (filtercategory: “asposewordsnet”)&pn=1&start=0&num=20&sort=score.desc

can you tell me the reason why I am not successful? please point towards anything I am missing / mistake. Additional work need to do.

This is bit urgent. Please reply.

Regards

(from github.com/marevol)
Did the query(ex. abcde AND label:asposeapi AND filtercategory:asposewordsnet) work on a search page(…/search/?q=abcde+AND+label:asposeapi+AND+filtercategory:asposewordsnet)?

(from github.com/AdeelIlyas2014)
@marevol

other fields like host instead of filtercategory are working but new additional field I introduce to the _mapping do not work on the query.

like label field is working perfect host field is working perfect for the above shared query / url but only new fields I added to the properties / mapping not affecting and not searchable through fess json api but through elastic search directly i am able. Pleas check. I am using 10.0.4 fess. Thanks

(from github.com/AdeelIlyas2014)
@marevol

This is working:

…/search/?q=(aspose) AND (label: “asposeapi”) AND (host: “www.xyz.com”)&pn=1&start=0&num=20&sort=score.desc

but this is not:

…/search/?q=(abcde) AND (label: “asposeapi”) AND (filtercategory: “asposewordsnet”)&pn=1&start=0&num=20&sort=score.desc

Your earliest help is requested. Thanks

(from github.com/marevol)
Does the following query work?

curl -XPOST localhost:9200/fess.search/_search -d '{"query":{"match_phrase":{"filtercategory":"asposewordsnet"}}}'

(from github.com/AdeelIlyas2014)
@marevol

These are working (without .search like not fess.search only /fess/ (so inshort yes the records are present in indexes and elastic search query is fetching)

curl -XGET localhost:9200/fess/_search -d ‘{“query”:{“match_phrase”:{“filtercategory”:“asposenet”}}}’

or (another field I have created before: “filterstr”)

curl -XGET localhost:9200/fess/_search -d ‘{“query”:{“match_phrase”:{“filterstr”:“asposewordsnet”}}}’

So they are available for search in indexes but our /json/q? webservice is not searching

Please check and verify it or let me know if I need to do anything further to fix it. Thanks