Questions tagged [whoosh]

Whoosh is a fast, featureful, full-text indexing and searching library implemented in pure Python.

Fast, pure-Python, full text indexing, search and spell checking library. Whoosh on the Python Package Index

Whoosh Documentation

373 questions
2
votes
0 answers

How to setup whoosh_search?

I have a problem setting up whoosh_search in my application. Very fast, let me show you my files configurations. settings.py: basedir = os.path.abspath(os.path.dirname(__file__)) WHOOSH_BASE = os.path.join(basedir, 'search.db') models.py: import…
Reznov
  • 175
  • 1
  • 3
  • 14
2
votes
1 answer

Cannot run Whoosh 'quickstart' example (FileNotFoundError)

I just tried to run the example at https://whoosh.readthedocs.io/en/latest/quickstart.html#a-quick-introduction cedricvr@atlantis94:~/repos/bibworm$ python3 Python 3.5.2 (default, Jul 5 2016, 12:43:10) [GCC 5.4.0 20160609] on linux Type "help",…
Cédric Van Rompay
  • 2,489
  • 1
  • 18
  • 24
2
votes
1 answer

How do I get the list of all terms in a Whoosh index?

I'd like to see which terms are used for indexing. This is mostly for debugging, in case I need to do some additional preprocessing to the documents before sending them to Whoosh. A list is fine. Is there a variable that gives me this (perhaps in…
Matt
  • 303
  • 1
  • 2
  • 16
2
votes
1 answer

How to use whoosh for searching keywords

Article Schema: Below is the article schema what I have created. class ArticleSchema(SchemaClass): title = TEXT( phrase=True, sortable=True, stored=True, field_boost=2.0, spelling=True, analyzer=StemmingAnalyzer()) keywords =…
Rahul Shrivastava
  • 1,391
  • 3
  • 14
  • 38
2
votes
1 answer

Union of 2 SearchQuerySet in django haystack

Is there any way to get an union of two or more searchqueryset ? For example :- query1 = SearchQuerySet().filter(authors=query) query2 = SearchQuerySet().filter(title=query) How do I combine both the queries together so that i get a union of the 2…
Subhajit
  • 361
  • 1
  • 4
  • 18
2
votes
2 answers

Searching with numbers - python - whoosh

I have indexed all my documents with a schema like this: ID = ID(stored=True) Body = TEXT(analyzer=StemmingAnalyzer(), stored=False,field_boost=4.0) Name = TEXT(stored=True, field_boost=5.0) Brand= TEXT(StemmingAnalyzer(),stored=False,…
Claudia Guirao
  • 335
  • 1
  • 3
  • 10
2
votes
2 answers

Flask form data type error (unicode data not being unicode)

I'm writing a small webpage using flask and I stumbled upon weird error. In simple form I want to pass 3 string values. When I try to pass any special characters (like "ł", "ą", etc.), flask gives me traceback of: 127.0.0.1 - - [18/Aug/2015…
2
votes
1 answer

How to handle file in Whoosh?

In the adventure to build a search engine, I started with Whoosh. The tutorial and web based materials are fine. Stackoverflow also has sizable question and answers. The initial experiments seem going fine. But I want to handle files located in…
2
votes
1 answer

How to get a indexed document or document field value by document number (doc id)

How do I get an indexed document or document field value by document number (doc id) using Whoosh? For example, if I get a set of matches by matcher=myquery.matcher(s); I can get matched doc num by matcher.id. How could we retrieve the document…
user3786340
  • 190
  • 1
  • 8
2
votes
1 answer

(haystack + whoosh) {{ result.object.get_absolute_url }} is not working

I am using haystack (2.1.1) and whoosh in my django (1.7) website. i am happy because it is working, but not completely. the app show the right searches but when i click in the results it doesn't go to the product page. it looks like i haven't…
oskreyes
  • 67
  • 1
  • 5
2
votes
1 answer

In PY whoosh full text search engineer, how to create a query to find a value in a range?

I am trying to find document by value in a specific range. The official document doesn't give example for different types of fields and search methods. Any smart guy can give me a link with more example and application? Any hint? Thank you! Here's…
MacSanhe
  • 2,212
  • 6
  • 24
  • 32
2
votes
1 answer

Whoosh: matching terms exactly

If there a way using Whoosh to return the documents that have a field matching exactly the terms in a query? For example, say I have a schema that has a autograph field that has three possible values; Autograph, Partial autograph, and No Autograph.…
chadgh
  • 9,063
  • 8
  • 38
  • 54
2
votes
0 answers

Object 'X' is already attached to session '15' (this is '1') only on Gunicorn using Flask

I have a fairly large app which is using Flask, with Flask-SQLAlchemy and Flask Whoosh Alchemy for searching. Everything works great when I run it locally. For some reason when I deploy it with gunicorn I get SQLAlchemy complaining of session…
Johnston
  • 20,196
  • 18
  • 72
  • 121
2
votes
0 answers

whoosh library not importing

I'm trying to use the whoosh python library. I added it to my system via pip, and can see it in my python dist-packages folder, which is on the path. in my code I have: from whoosh.fields import Schema, TEXT schema = Schema(title=TEXT,…
S..
  • 5,511
  • 2
  • 36
  • 43
2
votes
0 answers

Python: Highlighting exact phrase search results in Whoosh

According to the Whoosh docs (and this previous question on SO), it's possible to search for an exact phrase in Whoosh by placing double quotes around the phrase for which one wishes to search. When I try to implement an exact phrase search, though,…
duhaime
  • 25,611
  • 17
  • 169
  • 224