You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by suriya prakash <su...@gmail.com> on 2016/12/21 12:31:29 UTC

All Fields Search

Hi,

I have 500 fields in a document to index.

I append all the values and index it as separate field to support all
fields search. I will also have 500 separate fields for field level search.


Is there any other better way for all fields search?


Regards,
Suriya

Re: All Fields Search

Posted by Uwe Schindler <uw...@thetaphi.de>.
It would be much slower and scoring does not work as expected.

Full text search engines flatten the data and are fast because of that. Every additional field structure should also be flattened. To improve search you also index various stuff redundant, so you use copy fields to achieve that.

Uwe

Am 22. Dezember 2016 17:57:38 MEZ schrieb "Nicolás Lichtmaier" <ni...@wolfram.com>:
>Why not turning every term int the search into a BooleanQuery listing 
>all the diferent fields to be searched? Is there a problem with that?
>
>Nicolás.-
>
>
>El 21/12/16 a las 13:38, Uwe Schindler escribió:
>> Hi,
>>
>> This is the standard approach, there is no better way. This also
>keeps "scoring" working as expected, as the whole contents are seen as
>"one entity" during scoring.
>>
>> Uwe
>>
>> -----
>> Uwe Schindler
>> Achterdiek 19, D-28357 Bremen
>> http://www.thetaphi.de
>> eMail: uwe@thetaphi.de
>>
>>> -----Original Message-----
>>> From: suriya prakash [mailto:suriya3x@gmail.com]
>>> Sent: Wednesday, December 21, 2016 1:31 PM
>>> To: java-user@lucene.apache.org
>>> Subject: All Fields Search
>>>
>>> Hi,
>>>
>>> I have 500 fields in a document to index.
>>>
>>> I append all the values and index it as separate field to support
>all
>>> fields search. I will also have 500 separate fields for field level
>search.
>>>
>>>
>>> Is there any other better way for all fields search?
>>>
>>>
>>> Regards,
>>> Suriya
>>
>> ---------------------------------------------------------------------
>> 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

--
Uwe Schindler
Achterdiek 19, 28357 Bremen
https://www.thetaphi.de

Re: All Fields Search

Posted by Nicolás Lichtmaier <ni...@wolfram.com>.
Why not turning every term int the search into a BooleanQuery listing 
all the diferent fields to be searched? Is there a problem with that?

Nicol�s.-


El 21/12/16 a las 13:38, Uwe Schindler escribi�:
> Hi,
>
> This is the standard approach, there is no better way. This also keeps "scoring" working as expected, as the whole contents are seen as "one entity" during scoring.
>
> Uwe
>
> -----
> Uwe Schindler
> Achterdiek 19, D-28357 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>> -----Original Message-----
>> From: suriya prakash [mailto:suriya3x@gmail.com]
>> Sent: Wednesday, December 21, 2016 1:31 PM
>> To: java-user@lucene.apache.org
>> Subject: All Fields Search
>>
>> Hi,
>>
>> I have 500 fields in a document to index.
>>
>> I append all the values and index it as separate field to support all
>> fields search. I will also have 500 separate fields for field level search.
>>
>>
>> Is there any other better way for all fields search?
>>
>>
>> Regards,
>> Suriya
>
> ---------------------------------------------------------------------
> 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


RE: All Fields Search

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

This is the standard approach, there is no better way. This also keeps "scoring" working as expected, as the whole contents are seen as "one entity" during scoring.

Uwe

-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: suriya prakash [mailto:suriya3x@gmail.com]
> Sent: Wednesday, December 21, 2016 1:31 PM
> To: java-user@lucene.apache.org
> Subject: All Fields Search
> 
> Hi,
> 
> I have 500 fields in a document to index.
> 
> I append all the values and index it as separate field to support all
> fields search. I will also have 500 separate fields for field level search.
> 
> 
> Is there any other better way for all fields search?
> 
> 
> Regards,
> Suriya


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


Re: All Fields Search

Posted by Adrien Grand <jp...@gmail.com>.
This sounds like a good approach!

Le mer. 21 déc. 2016 à 13:31, suriya prakash <su...@gmail.com> a écrit :

> Hi,
>
> I have 500 fields in a document to index.
>
> I append all the values and index it as separate field to support all
> fields search. I will also have 500 separate fields for field level search.
>
>
> Is there any other better way for all fields search?
>
>
> Regards,
> Suriya
>