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
4
votes
3 answers

Haystack whoosh models() not narrowing models

I have the following query locations = SearchQuerySet().filter_or(content__in=words).models(Location) but it's returning other models as well, I would only want to see Location instances. Using Haystack 2.1.0 and whoosh 2.5 Any ideas?
James Lin
  • 25,028
  • 36
  • 133
  • 233
4
votes
2 answers

Django-haystack search with whoosh returns 'No results' debugging unsuccessful

I am new to Django and Haystack. I have done everything suggested on the "getting started" page of the Haystack Documentation and on the debugging page, but I cannot see where my error lies. sqs.count() returns 0 even though rebuild_index seems to…
4
votes
3 answers

Finding the number of haystack results by model type?

Let's say I have 3 models (Note, Comment, Article) that I want to search using django-haystack and I setup 3 indexes like this. class NoteIndex(SearchIndex): text = CharField(document=True, use_template=True) author =…
Ken Cochrane
  • 75,357
  • 9
  • 52
  • 60
3
votes
3 answers

how to limit search result count or set timeout in haystack with whoosh?

I use haystack with whoosh to search my company's code, every file per index. Most of the time, it works fine. However, when I search with some common keyword like 'port', the seaching takes 5 mins to finish, and the CPU is 100%. I think this is…
guoqiao
  • 1,309
  • 12
  • 14
3
votes
2 answers

Using haystack with Whoosh

Requires setting HAYSTACK_WHOOSH_PATH to the place on your filesystem where the Whoosh index should be located. Can anyone explain where exactly this path is pointing? I mean what should i give in this path?
G Gill
  • 1,087
  • 1
  • 12
  • 24
3
votes
1 answer

Django-haystack with whoosh

I am getting SearchBackendError at /forum/search/ No fields were found in any search_indexes. Please correct this before attempting to search. with search_indexes placed in djangobb app root directory: from haystack.indexes import * from haystack…
Cadilac
  • 1,090
  • 11
  • 17
3
votes
2 answers

Strange error adding to Whoosh index

Can anyone help me with this strange error I'm getting when adding a new document to a Whoosh index? Here's the code: def add_to_index(self, doc): ix = index.open_dir(self.index_dir) writer = AsyncWriter(ix) # use async writer to prevent…
kuhnza
  • 731
  • 1
  • 5
  • 15
3
votes
1 answer

what is Haystack for Django?

I have been reading about Haystack,Whoosh,Xapian,etc. however I didn't really get what they are exactly used for and what is the relationship between them. For example, it is said that Enable searching on third-party apps without touching that…
Hossein
  • 40,161
  • 57
  • 141
  • 175
3
votes
2 answers

Django haystack: writing a whoosh index to an S3 Bucket?

How can I configure my django app to write the haystack/whoosh index to an S3 bucket? I can't find any information on how to get going with this topic. Incidentally I am using Heroku for deployment. Django storages looks promising, but documentation…
null
  • 1,137
  • 2
  • 11
  • 29
3
votes
1 answer

Does whoosh require all strings to be unicode?

I am redoing my search app in Whoosh from Solr. I am now learning from the quick start. But I kept running into problems each time I had to deal with strings >>>writer.add_document(iden=fil, content=F2T.file_to_text(fil_path)) ValueError: 'File…
Jesvin Jose
  • 22,498
  • 32
  • 109
  • 202
3
votes
1 answer

Whoosh: Indexing MS documents, PDFs

I want to make a document search using python. Solr was no-go as Java hosting was a constraint. So whoosh seems the obvious option. But it seems not to natively index doc or pdf files (as Solr can). What is the way to make it deirectly index these…
Jesvin Jose
  • 22,498
  • 32
  • 109
  • 202
3
votes
2 answers

Django Haystack Indexing More than one models

I am trying to implement Haystack search for my website with Whoosh back-end. I have been able to successfully setup the haystack app and I can search the model that I have registered, but when I create the search_indexes.py file for another app, I…
Vikesh
  • 2,018
  • 6
  • 23
  • 33
3
votes
2 answers

python whoosh taking too long to index a large file

I have a CSV file with ~9 million rows. I want to be able to search a row from this file in a quick manner. I decided to use python whoosh to index this data and then search it, like below. schema = Schema(content=TEXT(stored=True,…
bcsta
  • 1,963
  • 3
  • 22
  • 61
3
votes
0 answers

TextRank using BM25F

I am trying to incorporate BM25F in textrank, I found out a scoring module http://whoosh.readthedocs.io/en/latest/api/scoring.html, but am unable to implement it. Has anyone incorporated this in textrank? How to go by this? I incorporated Textrank…
3
votes
2 answers

Can I get the scores calculated by whoosh for each document while searching?

I am trying to implement Okapi BM25 to search documents by query using python whoosh library. My understanding is that whoosh calculates the scores for each documents using BM25 according to the query and then sorts it to give the best result. I…
Ajit Barik
  • 33
  • 1
  • 6