Accents asciifolding JAVA API couchdb river

Greetings!

We're wrestling to perform a "queryString" that handle Latin accents,
no success so far.

Our scenario is:

  • Couchdb river:

curl -XPUT "localhost:9200/_river/idxscopus/_meta" -d "{"""type""" :
"""couchdb""", """couchdb""" : {"""host""" : """localhost""",
"""port""" : 5984, """db""" : """db-conhecimentos""", """filter""" :
null}, """index""" : { """index""" : """idxscopus""", """type""" :
"""idxscopus""", """bulk_size""" : """100""", """bulk_timeout""" :
"""10ms""", """analysis""": { """analyzer""": { """searchAnalyzer""":
{"""type""":"""custom""", """tokenizer""": """whitespace""",
"""filter""": ["""standard""", """lowercase""",
"""asciifolding"""] }}}}}

And a JAVA application executing the following statement:

SearchResponse response = client
.prepareSearch("idxscopus")
.setSearchType(SearchType.QUERY_AND_FETCH)
.setQuery(queryString(req.getParameter("tags"))
.defaultOperator(Operator.AND).analyzer("searchAnalyzer"))
.addHighlightedField("tags",0,0)
.setFrom(0).setExplain(true).execute().actionGet();

SearchHit[] docs = response.getHits().getHits();

We're getting an exception telling us that "searchAnalyzer" was not
found.

Does anybody see what we are doing wrong?

Thanks in advance!

index:
analysis:
analyzer:
default:
type: brazilian

You saved my life Klerisson! I was searching for something like this for a
long time, always having some problem with accents! I'm a Brazilian :smiley:

On Wednesday, May 16, 2012 10:57:22 PM UTC-3, Klerisson wrote:

index:
analysis:
analyzer:
default:
type: brazilian

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/accents-asciifolding-JAVA-API-couchdb-river-tp3923244p3998337.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--
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.

1 Like