In your get query example you used the "q=" syntax which causes a query
string search. In your json example you used a term query. Check the search
docs for query_string search to see the proper syntax
On Jan 12, 2011 11:11 AM, "Svet" svetef@gmail.com wrote:
The "query_string" is parsed (and analyzed) into something very close to
your attempt:
{ "query": { "term" : { "fuente": "avui" } } }
My conjecture is that when "fuente:Avui" is parsed, the term "Avui" is
normalized to lowercase as "avui" โ this should be the same which happens
when you index your documents (because the default query analyzer matches
the default index analyzer). So the "query_string" works ok, but not your
"term" query because that one does not analyze "Avui" and then you have no
match for this term with an uppercase letter "A".
So I suggest you try "avui" in lowercase at the "term" query. And probably
someone else in the list may confirm if I got that right.
My conjecture is that when "fuente:Avui" is parsed, the term "Avui" is
normalized to lowercase as "avui" รขยย this should be the same which
happens when you index your documents (because the default query
analyzer matches the default index analyzer). So the "query_string"
works ok, but not your "term" query because that one does not analyze
"Avui" and then you have no match for this term with an uppercase
letter "A".
So I suggest you try "avui" in lowercase at the "term" query. And
probably someone else in the list may confirm if I got that right.
The "query_string" is parsed (and analyzed) into something very close to
your attempt:
{ "query": { "term" : { "fuente": "avui" } } }
My conjecture is that when "fuente:Avui" is parsed, the term "Avui" is
normalized to lowercase as "avui" โ this should be the same which happens
when you index your documents (because the default query analyzer matches
the default index analyzer). So the "query_string" works ok, but not your
"term" query because that one does not analyze "Avui" and then you have no
match for this term with an uppercase letter "A".
So I suggest you try "avui" in lowercase at the "term" query. And probably
someone else in the list may confirm if I got that right.
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.