How to extend TermQuery to ''_all" field

hi all,

 In my case, fields are too much, I want use "_all" to simplify query 

parameters.
As term query dsl, I want use like this, how to implement it?

"term" : { "_all" : "kimchy" }

Thanks.
Haiwei

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/314eb7f6-cf20-4d93-b436-6938d92f3fa9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

The copy_to parameter can work in my case.  

Thanks

====================mails from lucene mail list=================

  'Internally this is  indexing every field a second time into the 

"_all" field.'

This sentence mean second indexing has total different analyzer and
indexing compared with my first indexing?

Exactly.

So I need rewrite the second
process to fix my problem?

In Elasticsearch you can define the analyzer for the "_all" field. It is
just configureable through the mapping like any other field.

But you should ask those questions on the Elasticsearch mailing list.

Hi,

by default there is no "_all" field. E.g., Elasticsearch adds this
special field
depending on your index mapping at the time of indexing the data.
Internally
this is indexing every field a second time into the "_all" field.

With Lucene you have to do this on yourself. An alternative would be to
use another query parser (like the SimpleQueryParser, see
SimpleQueryParser (Lucene 4.10.1 API)) that allows to expand the query to search on
multiple
fields with different weight factors.

Uwe


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

You should ask this on the elasticsearch mailing list.

BTW, look at elasticsearch copy_to feature. Better than _all field.

My 2 cents.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 oct. 2014 à 11:31, "haiwei.xie-soulinfo" haiwei.xie@soulinfo.com
a écrit :

Hi,

Thanks for your advise, SimpleQueryParser api is not enough in my 

case.

Actually, I want to index data from database, there are so many fields, I
have
tested "_all" parameter in Elasticsearch system, but the result of '_all'
and 'fieldname' are different for chinese term.

 'Internally this is  indexing every field a second time into the 

"_all" field.'

This sentence mean second indexing has total different analyzer and
indexing compared
with my first indexing? So I need rewrite the second process to fix my
problem?

Thanks.

Haiwei

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8a342b81-2ee7-45a5-a92c-3c0532d9c2b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.