I have an index for items, and I am making a suggest query on top of it like this below. It is working fine, but I want to include the item in suggestions list only if it is active and not sold. I am trying to do it through context, but not able to add to the context a boolean field, I already have added a context for geo-point to the schema and data, but not sure
how can I add a boolean context,
And how can I make a and condition for 2 context check, as I have 2 fields for active and sold.
Kindly help if you want experience with this, thanks.
Trying to add boolean context, I found you can only add contexts of type "geo_point" and "category". I am trying to add category context with boolean value, but it is returning an error that boolean can not a value for category context, but as my understanding I can put boolean values for a category context.
I am new to ES, please correct me if I am wrong, and describe the correct way of making a check on active/inactive with suggestions on name field of an item.
how can I convert boolean to string to fill in context. The index is primarily structured to make queries for list of items, where each item has active status as boolean. I want to use the same field in the suggestion context to only suggest items which are active. Your idea can work only if, I convert the active field in the actual record also, which is then used to fill in the context.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.