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 Avni Sompura <av...@gmail.com> on 2013/10/17 09:28:32 UTC

Search sentence from document based on keyword as input using lucene

Hi Team,

I have one requirement where i have to display sentences of valid document
if the keyword(input string) is found in that document.

I am thinking if parent-child relation will work?

DocBean

int doc_id
String doc_path
String content_id

ContentBean

int content_id
String content;

Need your suggestion on above problem.
Can this be done efficiently using SOLR?


Thanks,
Avni

Re: Search sentence from document based on keyword as input using lucene

Posted by Ian Lea <ia...@gmail.com>.
If you're using Solr you'd be better off asking this on the Solr list:
http://lucene.apache.org/solr/discussion.html.

You might also like to clarify what you want with regard to sentence
vs document.  If you want to display the sentences of a matched doc,
surely you just do it: store what you need and display it however you
like.  If you want to display the sentence, rather than a document, in
which a match occurred, that is a different question.  Sound rather
like highlighting.


--
Ian.


On Thu, Oct 17, 2013 at 8:28 AM, Avni Sompura <av...@gmail.com> wrote:
> Hi Team,
>
> I have one requirement where i have to display sentences of valid document
> if the keyword(input string) is found in that document.
>
> I am thinking if parent-child relation will work?
>
> DocBean
>
> int doc_id
> String doc_path
> String content_id
>
> ContentBean
>
> int content_id
> String content;
>
> Need your suggestion on above problem.
> Can this be done efficiently using SOLR?
>
>
> Thanks,
> Avni

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