lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Search "_all" field with a term
Date Sat, 11 Oct 2014 10:07:09 GMT
Hi,


>       '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
> 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: uwe@thetaphi.de
> >
> >
> > > -----Original Message-----
> > > From: haiwei.xie-soulinfo [mailto:haiwei.xie@soulinfo.com]
> > > Sent: Saturday, October 11, 2014 5:10 AM
> > > To: java-user@lucene.apache.org
> > > 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: java-user-unsubscribe@lucene.apache.org
> > > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> 
> 
> --
> haiwei
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message