[Xapian-discuss] Always returning ALL the documents matching a query

tata 668 tata668 at gmail.com
Mon Dec 29 18:52:24 GMT 2008


James, those examples will probably be useful for me one day, thanks!

I know this is probably not what you would suggest, but for now I think I'll keep my Xapian usage as 
it is: its only job is to return the ids of the posts with text respecting the main query. I will 
then use those resulting ids in a standard SQL query, to apply the other criterias.

I have too many things to do for my project right now to dig Xapian in depth. But, I won't have 
millions of documents indexed before a long time so I can live with my current solution for now. 
I'll check all your examples and links when my projects will be almost complete.

Still, I would be really glad if you could make me suggestions on how to improve Xapian in the way 
I'm currently using it! Is there a way of reducing the memory/CPU it takes, knowing that I'll ask it 
to return me all documents matching the query, every time?

For example, I use docid_order = Enquire.DONT_CARE because I don't need any order at all for the 
resulting ids! The ORDER BY will be done in my final SQL query. Also, I do some search caching: Once 
the initial search is done, I save the resulting post ids in a SQL table and generate a searchId. If 
the user click on "next search result page", the cached search will be used and Xapian won't even be 
called.

Any tips of that kind would be really appreciated, especially concerning Xapian itself!


Julien


James Aylett wrote:
> If anyone is interested, I've knocked up a slightly-more-complex
> indexer in Python (which does the same as simpleindex but with a
> couple of values based on the character and term length of the
> document), and written simple examples of using the MultiValueSorter
> and the NumberValueRangeProcessor.
> 
> At some point hopefully these will make their way into the
> distribution, but I want to run them past Richard & Olly first (one
> may be more complex than we want as an example). For the time being
> I've put them up on my site and linked to them from the wiki:
> <http://tartarus.org/james/computers/xapian/examples/>.
> 
> J
> 



More information about the Xapian-discuss mailing list