[Xapian-discuss] search result context.

Charles Brandt lists at st.imul.us
Mon Jan 23 15:42:35 GMT 2006


Thanks for the response Jim.

It sounds like saving the whole document to the xapian Document's data field
would bog down the search database.  That makes sense that you would need
the whole document for context display, I just wasn't sure if there was some
built in function that could rebuild pieces based on the position
information.

I'll be interested to hear if anyone else has built such a system.  If not
maybe I'll get to it someday. :)

Thanks again,

-Charles

----- Original Message ----- 
From: "Jim Lynch"
To: "Charles Brandt"
Sent: Monday, January 23, 2006 6:57 AM
Subject: Re: [Xapian-discuss] search result context.


> Generally in order to get a context display, like Google, you have to
> have access to the original document, since normally the document isn't
> saved in the database.  While it would be possible to save phrases
> around each term during the indexing phase it would be quite expensive
> and not very practical.  The other search engines I'm familiar with that
> do the context display use the original document(s) and extract phrases
> from them based on the term list provided by the search engine. This is
> usually done outside of the search engine, but in the case of Lucene,
> they do have a module that does it for you, but you have to provide the
> document.
>
>  That said, I've not seen anyone discuss doing this here, but then I've
> been away from the list for a while and just returned.
>
> Sorry I don't have the exact answer you were looking for, but I thought
> something needed to be said about context display.  It's not an
> extraordinarily difficult thing to code, but making it effecient might
> be a trick, especially if obtaining the original documents is expensive
> or the documents are quite large.
>
> Hopefully someone has already tackled the job and will pipe up with an
> answer.
>
> Jim
>
> Charles Brandt wrote:
>
> >Hello,
> >
> >I'm new to Xapian and I was wondering:
> >Is it possible to display the context in which the search terms were
found
> >within the matching document?
> >
> >It looks like typically the get_data and set_data are used to retrieve a
> >pre-defined summary of the document, but I was wondering if its possible
to
> >display something more dynamic and determined by the actual search
keywords.
> >
> >TIA
> >
> >-Charles.
> >
> >
> >
> >_______________________________________________
> >Xapian-discuss mailing list
> >Xapian-discuss at lists.xapian.org
> >http://lists.xapian.org/mailman/listinfo/xapian-discuss
> >
> >
> >
> >
> >
>
>





More information about the Xapian-discuss mailing list