Hi, I need to search in a big text field for a exact match.
I tried with different analyzers but in a lot of them i run on the lucerne size limit and i haven't found any that exact matches.
Are there any way to do that?
Hi,
It seems too vague to reproduce the problem. Could you share little more detail?
How long the text field? How long the query string? Which kind of analyzers have you tried? Have you tried N-gram analyzer? The query returned error message or just hit nothing? If you got an error message, sharing error message might help...etc
Or wildcard fieldtype is a good option for exact match for string fields.
my bad,
I tried all of the analyzers from this reference
The text field is a http response that can get very big, Ill look up exact size and post later.
The query string is about 8 characters.
I did not try n-gram, going to do that next and the wildcard fieldtype.
It matches the string but i also matches when there is no string.
Also the error that i run into was when i tried using the keyword, pattern analyzer. It was similar to this one, but my field is way bigger.
"reason": "Document contains at least one immense term in field=\"tags\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: '[82, 83, 75, 66, 99, 81, 87, 70, 69, 72, 49, 65, 70, 71, 48, 48, 53, 101, 86, 54, 112, 67, 53, 54, 80, 112, 56, 54, 70, 72]...', original message: bytes can be at most 32766 in length; got 32770",
"caused_by": {
"type": "max_bytes_length_exceeded_exception",
"reason": "bytes can be at most 32766 in length; got 32770"
}
Thank you for the anwser wildcard field works perfectly.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.