Hi Everyone,
I have escape Lucene's special characters and used synonyms search. Now it
is working as per the requirement.
But my concern is, i have to change "tokenizer" : "standard", TO
"tokenizer" : "whitespace", in the code to work synonyms search.
And when i change tokenizer standard to whitespace.
I am not getting the result for the particaular artist name ie, for Jaz-z
(include hyphen)
In tokenizer: standard, when i search Jaz z (without hyphen only space), it
gives me the output as Jay-z
But now this is not happening in the whitespace case.
Is there anything where i can use both tokenizer ?
Below is my code,
curl -X PUT 'http://localhost:9200/admin/?pretty=true' -d '
{
"settings" : {
"analysis" : {
"analyzer" : {
"artist_analyzer" : {
"tokenizer" : "whitespace",
"filter" : ["standard", "lowercase", "synonym",
"artist_metaphone", "asciifolding"]
}
},
"filter" : {
"artist_metaphone" : {
"type" : "phonetic",
"encoder" : "metaphone",
"replace" : false
},
"synonym" : {
"type" : "synonym",
"synonyms_path" :
"/var/www/html/elasticsearch-master/synonyms.txt"
}
}
}
}
}
'
Any help is very much aprreciated.
Thanks,
On Friday, November 8, 2013 12:57:57 PM UTC+5:30, Vallabh Bothre wrote:
Thanks for the suggestions,
Yes i am using "elasticsearch-analysis-phonetic/1.6.0" plugin and i think
it uses lucene.
I do have a artist name "Death (protopunk band)"
When i search for "Death (protopunk" including open brace "(" - query
fails.
On the other hand when i search "(protopunk band)" including both open and
close brace ( ) then it gives expected result.
I am little confused in elasticsearch query.
On Friday, November 1, 2013 8:37:32 PM UTC+5:30, Matt Weber wrote:
Are you trying to support lucene query syntax in your query? If yes, you
need to escape special characters as Jorg mentioned. If not, you should be
using a MatchQuery.
Elasticsearch Platform — Find real-time answers at scale | Elastic
Thanks,
Matt Weber
On Fri, Nov 1, 2013 at 7:04 AM, joerg...@gmail.com joerg...@gmail.comwrote:
You provide a correct artist name list for synonym search.
In your queries to ES, you described it as single exclamation mark, you
have to escape Lucene's special characters.
Jörg
--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.