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 Sajith Vimukthi <Sa...@zone24x7.com> on 2008/12/24 06:03:00 UTC

Limiting the content of the result

Hi all,

I am developing n application which indexes whole pdfs and other documents
to solr. I have completed a working version of my application. But there are
some problems. The main one is that when I do a search the indexed whole
document is shown. I have used solrj and need some help to reduce this
content. So great if I can only show a line or two with greatest importance.

 

Regards,

Sajith Vimukthi Weerakoon

Associate Software Engineer | ZONE24X7

| Tel: +94 11 2882390 ext 101 | Fax: +94 11 2878261 |

http://www.zone24x7.com

 


Re: Limiting the content of the result

Posted by Sujatha Arun <su...@gmail.com>.
Hi,

I think you are talking about limiting the content of content field in
search results.
We usually create a separate field in the schema and copy  only abt 250
chars and
show that field during display time.This field is only stored and not
indexed.


Regards
Sujatha

On 12/24/08, Shalin Shekhar Mangar <sh...@gmail.com> wrote:
>
> You need to use the hl, hl.fl and hl.snippets parameters. For example:
>
>
> http://localhost:8983/solr/select/?stylesheet=&q=solr+xml&version=2.1&start=0&rows=10&indent=on&hl=true&hl.fl=features,sku&hl.snippets=3
>
> See http://wiki.apache.org/solr/StandardRequestHandler for an example
> output.
>
> On Wed, Dec 24, 2008 at 11:19 AM, Sajith Vimukthi <Sajithw@zone24x7.com
> >wrote:
>
> > Hi,
> > Thanks a lot Shekhar. Indeed I need to limit the result within the
> > particular field. So how can I get it done?
> >
> > -----Original Message-----
> > From: Shalin Shekhar Mangar [mailto:shalinmangar@gmail.com]
> > Sent: Wednesday, December 24, 2008 10:51 AM
> > To: solr-user@lucene.apache.org
> > Subject: Re: Limiting the content of the result
> >
> > You probably want highlighting
> >
> > http://wiki.apache.org/solr/HighlightingParameters
> >
> > On Wed, Dec 24, 2008 at 10:33 AM, Sajith Vimukthi
> > <Sa...@zone24x7.com>wrote:
> >
> > > Hi all,
> > >
> > > I am developing n application which indexes whole pdfs and other
> > documents
> > > to solr. I have completed a working version of my application. But
> there
> > > are
> > > some problems. The main one is that when I do a search the indexed
> whole
> > > document is shown. I have used solrj and need some help to reduce this
> > > content. So great if I can only show a line or two with greatest
> > > importance.
> > >
> > >
> > >
> > > Regards,
> > >
> > > Sajith Vimukthi Weerakoon
> > >
> > > Associate Software Engineer | ZONE24X7
> > >
> > > | Tel: +94 11 2882390 ext 101 | Fax: +94 11 2878261 |
> > >
> > > http://www.zone24x7.com
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Regards,
> > Shalin Shekhar Mangar.
> >
> >
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Re: Limiting the content of the result

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
You need to use the hl, hl.fl and hl.snippets parameters. For example:

http://localhost:8983/solr/select/?stylesheet=&q=solr+xml&version=2.1&start=0&rows=10&indent=on&hl=true&hl.fl=features,sku&hl.snippets=3

See http://wiki.apache.org/solr/StandardRequestHandler for an example
output.

On Wed, Dec 24, 2008 at 11:19 AM, Sajith Vimukthi <Sa...@zone24x7.com>wrote:

> Hi,
> Thanks a lot Shekhar. Indeed I need to limit the result within the
> particular field. So how can I get it done?
>
> -----Original Message-----
> From: Shalin Shekhar Mangar [mailto:shalinmangar@gmail.com]
> Sent: Wednesday, December 24, 2008 10:51 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Limiting the content of the result
>
> You probably want highlighting
>
> http://wiki.apache.org/solr/HighlightingParameters
>
> On Wed, Dec 24, 2008 at 10:33 AM, Sajith Vimukthi
> <Sa...@zone24x7.com>wrote:
>
> > Hi all,
> >
> > I am developing n application which indexes whole pdfs and other
> documents
> > to solr. I have completed a working version of my application. But there
> > are
> > some problems. The main one is that when I do a search the indexed whole
> > document is shown. I have used solrj and need some help to reduce this
> > content. So great if I can only show a line or two with greatest
> > importance.
> >
> >
> >
> > Regards,
> >
> > Sajith Vimukthi Weerakoon
> >
> > Associate Software Engineer | ZONE24X7
> >
> > | Tel: +94 11 2882390 ext 101 | Fax: +94 11 2878261 |
> >
> > http://www.zone24x7.com
> >
> >
> >
> >
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
>


-- 
Regards,
Shalin Shekhar Mangar.

RE: Limiting the content of the result

Posted by Sajith Vimukthi <Sa...@zone24x7.com>.
Hi,
Thanks a lot Shekhar. Indeed I need to limit the result within the
particular field. So how can I get it done? 

-----Original Message-----
From: Shalin Shekhar Mangar [mailto:shalinmangar@gmail.com] 
Sent: Wednesday, December 24, 2008 10:51 AM
To: solr-user@lucene.apache.org
Subject: Re: Limiting the content of the result

You probably want highlighting

http://wiki.apache.org/solr/HighlightingParameters

On Wed, Dec 24, 2008 at 10:33 AM, Sajith Vimukthi
<Sa...@zone24x7.com>wrote:

> Hi all,
>
> I am developing n application which indexes whole pdfs and other documents
> to solr. I have completed a working version of my application. But there
> are
> some problems. The main one is that when I do a search the indexed whole
> document is shown. I have used solrj and need some help to reduce this
> content. So great if I can only show a line or two with greatest
> importance.
>
>
>
> Regards,
>
> Sajith Vimukthi Weerakoon
>
> Associate Software Engineer | ZONE24X7
>
> | Tel: +94 11 2882390 ext 101 | Fax: +94 11 2878261 |
>
> http://www.zone24x7.com
>
>
>
>


-- 
Regards,
Shalin Shekhar Mangar.


Re: Limiting the content of the result

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
You probably want highlighting

http://wiki.apache.org/solr/HighlightingParameters

On Wed, Dec 24, 2008 at 10:33 AM, Sajith Vimukthi <Sa...@zone24x7.com>wrote:

> Hi all,
>
> I am developing n application which indexes whole pdfs and other documents
> to solr. I have completed a working version of my application. But there
> are
> some problems. The main one is that when I do a search the indexed whole
> document is shown. I have used solrj and need some help to reduce this
> content. So great if I can only show a line or two with greatest
> importance.
>
>
>
> Regards,
>
> Sajith Vimukthi Weerakoon
>
> Associate Software Engineer | ZONE24X7
>
> | Tel: +94 11 2882390 ext 101 | Fax: +94 11 2878261 |
>
> http://www.zone24x7.com
>
>
>
>


-- 
Regards,
Shalin Shekhar Mangar.