Hi Team, first post here and hope you guys can help me stop going round and round!
It's java code using elastic libs/methods
I'm trying to look for a string in a field - eg, ":21:test123blah" and expecting it to fail and hit my error messages, but instead I get some docs back, although none of them have my search string.
If, however, I search for just "test123blah" then it correctly returns the error message I've created indicating no matched records.
I then send it to matchQ to a searchsourcebuilder.query and set that as the searchrequest.source - all of which is oretty standard I think... The query is with why I can't seem to use the ":21:" as part of the query correctly.
PS, also tried to double escape (//) the ":" chars, still to no avail
In order to understand what happens here, you need to understand how a string like :21:test.. is depicted into single tokens and how it is stored in the inverted index. This is massively different like a SQL database.
I'll start wading through but you got any pointers as time is against me - ie, I assume it's down to the ":" characters as they are a special character for searching, right? Or is it in effect, returning any hits that has ":", "21" and ":" in the "message" field aswell as the "testref" value?
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.