Skip to main content
haystack-queryparser
====================

Converts arbitrarily complicated user entered query strings to a haystack query object.

###Usage
```python
from haystack_queryparser import ParseSQ
```
Also provides or_parser and and_parser which can be directly used with a query
```python
parser = ParseSQ()
sq_object = parser.parse(query)
```
takes a `AND` or `OR` operator to use as default optionally.

###Input
Input should be a string.This the query.

###Output
Output is a `SQ(haystack.query.SQ)` object.
This can be passed to `SearchQuerySet.filter` and the query will be applied

###Test
To run the test you need to be in the django environment.So you can do something like this:
```
$ python manage.py shell
>>> import haystack_queryparser.tests as test
>>> tests.main()
test_operators (modules.haystack_queryparser2.tests.SimpleTest) ... ok
test_parse (modules.haystack_queryparser2.tests.SimpleTest) ... ok
test_parse_with_new_default (modules.haystack_queryparser2.tests.SimpleTest) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.004s

OK
```

Metadata

Release files for haystack_queryparser 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for haystack_queryparser 0.2.1
File Size Uploaded
haystack_queryparser-0.2.1.tar.gz 3.5 kB Details

Release files / haystack_queryparser-0.2.1.tar.gz

Download URL haystack_queryparser-0.2.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
099db7c7f1e109245ccd0a52800a4173f386e927d2ff7d4305fe61b3d7d573d6
BLAKE2b-256 checksum
How to use checksums
b0a3488fa403b6966946f5e987f0175218f6ae087f8e4379fbff64bc3a046a63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page