django-sphinx | transparent layer for full-text search using Sphinx
kandi X-RAY | django-sphinx Summary
kandi X-RAY | django-sphinx Summary
A transparent layer for full-text search using Sphinx and Django
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of django-sphinx
django-sphinx Key Features
django-sphinx Examples and Code Snippets
Community Discussions
Trending Discussions on django-sphinx
QUESTION
I'm using django-sphinxql for search requirements in my django project. I want to use two models in my app for search with some query. Models look as below
...ANSWER
Answered 2018-Mar-05 at 11:47For foreign key fields in Sphinx we can use double underscores(__) to point to specific field for indexing. User model_attr
for this
In above example
class Model1Index(indexes.Index):
name = fields.Text(model_attr='name')
caption = fields.Text(model_attr='model2__caption')
class Meta:
model = Model1
settings.INDEXES['source_params'] = {'sql_field_string': ['name'],}
can be defined.
Reference http://django-sphinxql.readthedocs.io/en/latest/indexes.html
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install django-sphinx
No Installation instructions are available at this moment for django-sphinx.Refer to component home page for details.
Support
If you have any questions vist the community on GitHub, Stack Overflow.
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page