Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding popular searches? #41

Closed
rlam3 opened this issue Jul 9, 2015 · 2 comments
Closed

Finding popular searches? #41

rlam3 opened this issue Jul 9, 2015 · 2 comments
Labels

Comments

@rlam3
Copy link
Contributor

rlam3 commented Jul 9, 2015

How to obtain popular searches from a particular type of object. Specifically say for example the search is supposed to return a list of Car objects. What would the query look like to return the top searches?

x = Car.pure_whoosh('Aud*')

print x
<Top 1 Results for Or([Prefix('display_name', u'au'), Prefix('description', u'au'), Prefix('name', u'au')]) runtime=0.00333499908447>

x

x.collector             x.extend                x.has_exact_length      x.order                 x.searcher
x.copy                  x.facet_names           x.has_matched_terms     x.q                     x.top_n
x.docnum                x.fields                x.highlighter           x.query_terms           x.upgrade
x.docs                  x.filter                x.is_empty              x.runtime               x.upgrade_and_extend
x.docset                x.formatter             x.items                 x.score                 
x.estimated_length      x.fragmenter            x.key_terms             x.scored_length         
x.estimated_min_length  x.groups                x.matched_terms         x.scorer                

I cannot find how how to get the Car primary key or the top search results back or the car objects from x variable. Any suggestions would help

@arthurbarros
Copy link

+1

@rlam3
Copy link
Contributor Author

rlam3 commented Sep 30, 2015

I'm looking for an sqlalchemy solution not a Pony solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants