[Catalog-sig] search queries in PyPI
tarek.ziade at ingeniweb.com
Thu May 15 09:48:47 CEST 2008
2008/5/15 Richard Jones <richardjones at optushome.com.au>:
> On Thu, 15 May 2008, Tarek Ziade wrote:
> > I think it wouldn't cost too much here to change the webui interface, to
> > use store.py features.
> The current search implementation is a trade-off between the complexity you
> would like to have and useful results for arbitrary, inelegant term lists.
ok, yes my use case is being able to look for several words with AND and/or
if searchable_text is a field with all text the package has:
search('nose AND plugin')
--- which in my mind would result in something like:
select distinct package_name
where searchable_text like '%nose%' AND name like '%plugin%'
But i guess it can be rather complex, and Noah's trick fit my needs :D
> Your pseudo-code omits an important feature - the scoring of the result
> on the type of match.
semi-related: looking at the code, I think query_packages can be called just
per term, then the score calculated for each column on the results. That
lower the number of queries (1/3).
> Perhaps the scoring could be altered such that hits on more than one term
> the same field result in a higher score?
if it is doable, that would be nice,
Maybe we could have an advanced search screen that would take care of asking
the user which field the term refers too (like roundup) ?
> Catalog-SIG mailing list
> Catalog-SIG at python.org
Tarek Ziadé - Directeur Technique
INGENIWEB (TM) - SAS 50000 Euros - RC B 438 725 632
Bureaux de la Colline - 1 rue Royale - Bâtiment D - 9ème étage
92210 Saint Cloud - France
Phone : 01.78.15.24.00 / Fax : 01 46 02 44 04
http://www.ingeniweb.com - une société du groupe Alter Way
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalog-SIG