Hi,
Let's say I have a list of items and categories.
1: name: BLUE DUCK, category: BLUE
2: name: RED DUCK, category: RED
3: name: DAFFY, category: DUCK
I want to index the items' names and categories but I don't want the "category" to be searchable, as it would not return anything relevant.
So if I search for DUCK, the result will be BLUE DUCK (BLUE) + RED DUCK (RED), but DAFFY will not be included. Then I'd like to be able to use the category in a facet to filter blue or red.
Is there a way to configure that in the mapping?
My real-life case scenario is obviously more complicated and I can't just specify "name:DUCK" in the query string.
How can I solve that problem?
Cheers.
check the "index" attribute, if you want to configure a field not to be
searchable at all via mapping. There might be different solutions
preventing fields from being searchable, as usual it depends on your
concrete use case.
Hi,
Let's say I have a list of items and categories.
1: name: BLUE DUCK, category: BLUE
2: name: RED DUCK, category: RED
3: name: DAFFY, category: DUCK
I want to index the items' names and categories but I don't want the
"category" to be searchable, as it would not return anything relevant.
So if I search for DUCK, the result will be BLUE DUCK (BLUE) + RED DUCK
(RED), but DAFFY will not be included. Then I'd like to be able to use the
category in a facet to filter blue or red.
Is there a way to configure that in the mapping?
My real-life case scenario is obviously more complicated and I can't just
specify "name:DUCK" in the query string.
How can I solve that problem?
Cheers.
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.