You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tom Running <ru...@gmail.com> on 2016/02/18 07:05:20 UTC

Display entire string containing query string

Hello,

I am working on a project using Solr to search data from retrieved from
Nutch.

I have successfully integrated Nutch with Solr, and Solr is able to search
Nutch's data.

However I am having a bit of a problem. If I query Solr, it will bring back
the numfound and which document the query string was found in, but it will
not display the string that contains the query string.

Can anyone help on how to display the entire string that contains the query.


I appreciate your time and guidance. Thank you so much!

-T

Re: Display entire string containing query string

Posted by Alvaro Cabrerizo <to...@gmail.com>.
Hi,

To understand Binoy's answer, please check the: The fl (Field List)
Parameter
<https://cwiki.apache.org/confluence/display/solr/Common+Query+Parameters#CommonQueryParameters-Thefl(FieldList)Parameter>.
If you want to include: "*fragments of documents that match the user's
query to be included with the query response*", please check the Highlighting
feature <https://cwiki.apache.org/confluence/display/solr/Highlighting>.
Solr is so well documented!

Regards.

On Thu, Feb 18, 2016 at 7:19 PM, Tom Running <ru...@gmail.com> wrote:

> Hello
> Thank you for your reply.
> I am wondering if you can clarify a bit more for me. Is
> field_where_string_may_be_present something that I have to specify? I am
> searching HTML page.
> For example if I search for the word "name" I am trying to display the
> entire sentence containing  "name = T" or maybe "name: T". Ultimately by
> searching for the string "name" I am trying to find the value of name.
>
> Thanks for your time. I appreciate your help
> -T
> On Feb 18, 2016 1:18 AM, "Binoy Dalal" <bi...@gmail.com> wrote:
>
> > Append &fl=<field_where_string_may_be_present>
> >
> > On Thu, 18 Feb 2016, 11:35 Tom Running <ru...@gmail.com> wrote:
> >
> > > Hello,
> > >
> > > I am working on a project using Solr to search data from retrieved from
> > > Nutch.
> > >
> > > I have successfully integrated Nutch with Solr, and Solr is able to
> > search
> > > Nutch's data.
> > >
> > > However I am having a bit of a problem. If I query Solr, it will bring
> > back
> > > the numfound and which document the query string was found in, but it
> > will
> > > not display the string that contains the query string.
> > >
> > > Can anyone help on how to display the entire string that contains the
> > > query.
> > >
> > >
> > > I appreciate your time and guidance. Thank you so much!
> > >
> > > -T
> > >
> > --
> > Regards,
> > Binoy Dalal
> >
>

Re: Display entire string containing query string

Posted by Tom Running <ru...@gmail.com>.
Hello
Thank you for your reply.
I am wondering if you can clarify a bit more for me. Is
field_where_string_may_be_present something that I have to specify? I am
searching HTML page.
For example if I search for the word "name" I am trying to display the
entire sentence containing  "name = T" or maybe "name: T". Ultimately by
searching for the string "name" I am trying to find the value of name.

Thanks for your time. I appreciate your help
-T
On Feb 18, 2016 1:18 AM, "Binoy Dalal" <bi...@gmail.com> wrote:

> Append &fl=<field_where_string_may_be_present>
>
> On Thu, 18 Feb 2016, 11:35 Tom Running <ru...@gmail.com> wrote:
>
> > Hello,
> >
> > I am working on a project using Solr to search data from retrieved from
> > Nutch.
> >
> > I have successfully integrated Nutch with Solr, and Solr is able to
> search
> > Nutch's data.
> >
> > However I am having a bit of a problem. If I query Solr, it will bring
> back
> > the numfound and which document the query string was found in, but it
> will
> > not display the string that contains the query string.
> >
> > Can anyone help on how to display the entire string that contains the
> > query.
> >
> >
> > I appreciate your time and guidance. Thank you so much!
> >
> > -T
> >
> --
> Regards,
> Binoy Dalal
>

Re: Display entire string containing query string

Posted by Binoy Dalal <bi...@gmail.com>.
Append &fl=<field_where_string_may_be_present>

On Thu, 18 Feb 2016, 11:35 Tom Running <ru...@gmail.com> wrote:

> Hello,
>
> I am working on a project using Solr to search data from retrieved from
> Nutch.
>
> I have successfully integrated Nutch with Solr, and Solr is able to search
> Nutch's data.
>
> However I am having a bit of a problem. If I query Solr, it will bring back
> the numfound and which document the query string was found in, but it will
> not display the string that contains the query string.
>
> Can anyone help on how to display the entire string that contains the
> query.
>
>
> I appreciate your time and guidance. Thank you so much!
>
> -T
>
-- 
Regards,
Binoy Dalal