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 Rajendra Rao <ra...@launchship.com> on 2014/02/13 11:16:07 UTC

Which is better ,Search through query and whole text document or search through query with document field.

Hello,

I have query and document.Its unstructured & natural  text.I used lucene
for searching document on query.If I  separate Document into field and then
search.what will be difference?
I can't check it because now i don't have field separated data .But in
future we will have.

Thanks.

Re: Which is better ,Search through query and whole text document or search through query with document field.

Posted by Ian Lea <ia...@gmail.com>.
The one that meets your requirements most easily will be the best.

If people will want to search for words in particular fields you'll
need to split it but if they only ever want to search across all
fields there's no point.

A common requirement is to want both, in which case you can split it
and also store everything in a common field called something like
"contents".  Or look at MultiFieldQueryParser.


--
Ian.


On Thu, Feb 13, 2014 at 10:16 AM, Rajendra Rao
<ra...@launchship.com> wrote:
> Hello,
>
> I have query and document.Its unstructured & natural  text.I used lucene
> for searching document on query.If I  separate Document into field and then
> search.what will be difference?
> I can't check it because now i don't have field separated data .But in
> future we will have.
>
> Thanks.

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