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
1
vote
0 answers

Whoosh Phrase Frequency in One Document

I am trying to find the frequency of phrases in the text. But if there are several phrases in one document Whoosh still counts the whole document as a hit but not the Phrases entry. Example: self.analyzer =…
1
vote
2 answers

Multi-field search whoosh with field filters

I am using whoosh to index and search throught my documents. I developped a multi=field search, but I want to specify some "MUST" fields. What I want is: I when I am searching for a book with a query q1, it search on title and summary, but I want to…
noaai
  • 59
  • 1
1
vote
1 answer

Using whoosh as matcher without an index

Is it possible to use whoosh as a matcher without building an index? My situation is that I have subscriptions pre-defined with strings, and documents coming through in a stream. I check each document matches the subscriptions and send them if so. I…
dr-spangle
  • 11
  • 3
1
vote
1 answer

Whoosh Filtering Raising AttributeError: 'Term' object has no attribute 'Term'

I am trying to apply filter on whoosh results. When I apply filter without a python function, I get results. However, when I put filter in a python function, I get 'AttributeError: 'Term' object has no attribute 'Term'. Please see the gist with…
akeahey
  • 11
  • 1
1
vote
0 answers

Python Whoosh multi-field parser dates and strings

I am building a search engine and would like to concurrently search for strings and dates. In my index date is my date field and name is my string field: ix = index.open_dir(dirname) schema = ix.schema mp = qparser.MultifieldParser(['date',…
user 123342
  • 463
  • 1
  • 9
  • 21
1
vote
1 answer

Python Whoosh library also give search result if any one using synonyms words in given query text

I am using using below code for searching text for documents using whoosh python library please help me how to get search result if any one use synonym words in query text search. Please help me for search synonyms text search. what line of code i…
1
vote
1 answer

difficulty setting up and using Flask_whooshalchemy

I'm currently working on a flask web app with a large database which meant that I had to discard the code I had initially written for WhooshAlchemy. The first time I tested it I got the following error. …
abood bah
  • 154
  • 3
  • 17
1
vote
1 answer

Haystack/Whoosh convert string to bytes-like object? "Cannot use a string pattern on a bytes-like object" error

On my Django (2.2.7, Python 3.7) project, I use Haystack(2.8.1) and Whoosh(2.7.4) for fulltext search. When searching, I always get Cannot use a string pattern on a bytes-like object error. I know, in general, why this error happens, but I don't…
user3024710
  • 515
  • 1
  • 6
  • 15
1
vote
0 answers

Issue with Haystack/Whoosh SearchQuerySet's order_by

I define an index as shown below, zero-padding the order_key integerfield as specified in the doc. class PlaceIndex(SearchIndex): text = CharField(document=True, use_template=True) order_key = IntegerField(model_attr='order_key') def…
jul
  • 36,404
  • 64
  • 191
  • 318
1
vote
0 answers

Whoosh: Retrieve Document Numbers and Titles from Index

Given a large corpus of indexed documents with Whoosh I am trying to retrieve the titles (indexed field) with the associated document numbers. How can I retrieve both document number and titles itemwise from the index? Background: I indexed my…
Pete
  • 100
  • 4
  • 15
1
vote
1 answer

How to delete document from index by it's path in Whoosh

First i add documents to index like this: writer.add_document(title=doc_path.split(os.sep)[-1], path=doc_path, content=text, textdata=text) And then i just need to delete one of them completely from index by it's path. Documentation says there are…
Dmitrii
  • 604
  • 2
  • 9
  • 30
1
vote
0 answers

Performance comparison between Lucene Vs PyLucene Vs Whoosh

Is there any benchmark comparing Lucene Vs PyLucene Vs Whoosh? Lucene seems to be far ahead in terms of popularity, but I'm looking for something more Pythonic. So just want to get rough idea on the tradeoff.
Dian Bakti
  • 310
  • 5
  • 15
1
vote
1 answer

QueryParser.parse, restrict the distance between words

I am using whoosh package to do full-text fuzzy match. My current code is as follows: from whoosh.index import create_in from whoosh.fields import * from whoosh.query import FuzzyTerm class MyFuzzyTerm(FuzzyTerm): def __init__(self, fieldname,…
dara wong
  • 37
  • 5
1
vote
0 answers

Is there any way to return distance in QueryParser of whoosh

I am using whoosh package to fuzzy search in Python. I am wondering if there is any way to return the distance? My code is as follows: import codecs import whoosh import os, os.path from whoosh.index import create_in from whoosh.fields import…
dara wong
  • 37
  • 5
1
vote
1 answer

Maximum recursion depth exceeded when building a whoosh index

I am trying to index some documents using Whoosh. However, when I try to add the documents to the Whoosh index, Python eventually gives back the following error: RecursionError: maximum recursion depth exceeded while calling a Python object I have…