Django Haystack select which fields to search

You can use AutoQuery instead of the standard filter:

from haystack.inputs import AutoQuery


EDITED In order to run OR query with “haystack” use SQ objects:

from haystack.backends import SQ
from haystack.inputs import AutoQuery

    SQ(first_name=AutoQuery('foo')) | SQ(last_name=AutoQuery('foo'))

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top