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
1 answer

Python: Whoosh seems to return incorrect results

This code is straight from Whoosh's quickstart docs: import os.path from whoosh.index import create_in from whoosh.fields import Schema, STORED, ID, KEYWORD, TEXT from whoosh.index import open_dir from whoosh.query import * from whoosh.qparser…
duhaime
  • 25,611
  • 17
  • 169
  • 224
2
votes
1 answer

Whoosh returning empty values

I am using Whoosh to index and search a variety of texts in various encodings. When performing a search on my indexed files, though, some of the matching results are not appearing in the output employing the "highlighting" feature. I have a feeling…
duhaime
  • 25,611
  • 17
  • 169
  • 224
2
votes
1 answer

whoosh_search() returns empty

Tutorial at http://pythonhosted.org/Flask-WhooshAlchemy/ works for me. Here's my setup class Post(db.Model): __tablename__ = 'post' __searchable__ = ['body'] id = db.Column(db.Integer, primary_key=True) body =…
onepiece
  • 3,279
  • 8
  • 44
  • 63
2
votes
2 answers

Flask-WhooshAlchemy with existing database

How can I get Flask-WhooshAlchemy to create the .seg files for an already existing database filled with records? By calling: with app.app_context(): whooshalchemy.whoosh_index(app, MappedClass) I can get the .toc file, but the .seg files will…
Sebastian Elsner
  • 297
  • 1
  • 6
  • 14
2
votes
1 answer

can`t install whoosh alchemy

I can`t seem to install whoosh alchemy for the life of me. reference: http://pythonhosted.org/Flask-WhooshAlchemy/ . Anyway, i'm following http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world and at the part where i'm…
2
votes
2 answers

Rebuild_index and update_index killed

I'm having issues getting the indexing process to work. I have a model called Article and in the db I have 943 records in the Article table. For testing locally, I have a sqlite db with 12 articles, and the rebuild_index and update_index run fine.…
AndrewSmiley
  • 1,933
  • 20
  • 32
2
votes
1 answer

SearchBackendError: No fields were found in any search_indexes

I am trying to set up django-haystack using whoosh as engine. My problem happens while building my first index as explained here. Given my staff/models.py: class Person(models.Model): first_name = models.CharField(_('first name'),…
sogeking
  • 1,216
  • 2
  • 14
  • 45
2
votes
2 answers

django haystack Whoosh - SearchQuerySet().models(ModelName) not narrowing results

I have 3 models with 3 indexes like (Modelname1Index, ModelName2Index, Modelname3Index) in search_indexes.py. SearchQuerySet().filter is search from all the three, but I want to search each of them separately. So, I tried doing like: …
user2139745
  • 1,721
  • 4
  • 19
  • 30
2
votes
1 answer

Exact match of multiple words in whoosh

By default, a multiple word search is split into files that have each word separately. How can I override this default and have whoosh search for an exact match? Even though it's most likely supported, I can't find in google/whoosh documentation. In…
maged
  • 859
  • 10
  • 24
2
votes
1 answer

Haystack Whoosh Spelling Suggestion too greedy

This questions is about Django Haystack, with Whoosh backend. I would like to use spelling suggestion in my search. The problem is that it is suggesting TOO much. Say I have two models: Apples and Oranges. If I have somethine like this: result =…
Andriy Drozdyuk
  • 58,435
  • 50
  • 171
  • 272
2
votes
0 answers

How to search an object combining with related foreignkey

I have two models as below. And I want to search and get the Brand objects both by Brand.name and by Item's titles which are related to the Brand. class Brand(models.Model): name = models.CharField() class Item(models.Model): title =…
2
votes
1 answer

Python-Whoosh BufferedWriter does not commit to the disk

Here is example in which I try to index large collection with whoosh schema = Schema(name=TEXT(stored=True), m=ID(stored=True), content=KEYWORD(stored=True)) ix = create_in("indexdir", schema) from whoosh.writing import BufferedWriter from…
Moonwalker
  • 2,180
  • 1
  • 29
  • 48
2
votes
1 answer

Django haystack filter in search index

I have a search working fine on my project. But in my models I have a boolean field named is_active. I want the search occurs only when is_active is True, but I've been testing this without any satisfatory response. my search_indexes.py: from…
Fernando Freitas Alves
  • 3,709
  • 3
  • 26
  • 45
2
votes
1 answer

Cosine scoring in whoosh, python

I've implemented some python code to run search on whoosh using BM25 and all went out ok, but now that I'm trying to change scoring mechanism to Cosine, I'm getting this error: File "TFIDF.py", line 18, in tfidf with…
David Dias
  • 1,792
  • 3
  • 16
  • 28
2
votes
2 answers

Whoosh: shouldn't OR only increase results?

We have about 9k documents indexed using Haystack 1.2.7 with Whoosh 2.4.1 as backend. Despite of using Haystack, it looks like a Whoosh problem. Take a look at my debug cases: 1) If I just run an exact lookup, Whoosh finds my document (as…