Hi ,
I have an analysed field , it may have different values for each documents. For example ,
doc1 : { "field1" : "abc01 - (http://abc01.com/)" }
doc2 : { "field1" : "abc02 - (http://abc02.com/)" }
doc3 : { "field1" : "-" }
The following is my analysis settings,
index :
analysis :
analyzer :
default_index :
type : custom
tokenizer : whitespace
filter : [ word_delimiter, snowball, lowercase]
default_search :
type : custom
tokenizer : whitespace
filter : [ word_delimiter, snowball, lowercase]
filter :
word_delimiter :
type : word_delimiter
preserve_original : true
split_on_numerics : true
stem_english_possessive : false
I need to filter documents which has only "-" ? i.e.. is it possible query only doc3 (no other terms other than "-")? since doc1 & doc2 also has "-" along with some other terms.
One solution i know is ,
Syntax: boolQuery.must("-") + boolQuery.mustNot("abc*" )
Here too i production mode, i couldn't find all other terms which i need to specify in not query.