Extending search through date based + others

3 views
Skip to first unread message

Alvin

unread,
Nov 11, 2009, 5:00:16 PM11/11/09
to Djapian Users
Does anyone have an example of extending the djapian search by
limiting the indexed rows further? for example by date?

ex: search term: dog
begin_field > 2008-08-31
end_field < 2010-05-12


I'm thinking the way to do this is setup a query that limits the
results by the date range and then run the search against that list,
though I'm a bit perplexed how to accomplish this

Alex Koshelev

unread,
Nov 14, 2009, 11:40:06 AM11/14/09
to djapia...@googlegroups.com
Hi, Elvin!

Try to perform this query:

MyModel.indexer.query('dog').filter(begin_field__gt='2008-08-31', end_field__lt='2010-05-12')

I think you can get result that you want if `begin_field` and `end_field` are in index.

---
Alex Koshelev


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Djapian Users" group.
To post to this group, send email to djapia...@googlegroups.com
To unsubscribe from this group, send email to djapian-user...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/djapian-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Reply all
Reply to author
Forward
0 new messages