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
> 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 http://goo.gl/4blGsp)
> 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: [email protected]
>
>
> > -----Original Message-----
> > From: haiwei.xie-soulinfo [mailto:[email protected]]
> > Sent: Saturday, October 11, 2014 5:10 AM
> > To: [email protected]
> > Subject: Search "_all" field with a term
> >
> > hi all,
> >
> > Does lucene support all fields with a term? Can I use "_all" intead
> > "fieldname"?
> >
> > As Lucene's APIs example code:
> > ...
> > // Parse a simple query that searches for "text":
> > QueryParser parser = new QueryParser(Version.LUCENE_CURRENT,
> > "fieldname", analyzer);
> > Query query = parser.parse("text");
> > ...
> >
> > Thanks
> > --
> > haiwei
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
haiwei
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]