Questions tagged [searchqueryset]
40 questions
0
votes
1 answer
Using django-haystack +Elasticsearch how can I search subsets of a word?
If I enter the query "apple" i wish to get the results like "xyzapplexyz","apple","applexyz" and NOT like "app" or "appl" . But what I am getting is "applexyz", "app" etc.
I have used EdgeNgram field and I have tried querying using the following…

Subhajit
- 361
- 1
- 4
- 18
0
votes
1 answer
Which attribute of SearchQuerySet has the same function as prefetch_related?
def get_books_by_query_params(context, query, query_parameters):
binding_query = query_parameters['binding_query']
query_parameters['validate']=1
default_query = None
if query:
default_queries = [
Q(title__icontains=query),
…

Subhajit
- 361
- 1
- 4
- 18
0
votes
1 answer
Filter with two models in one queryset - Advanced search django
Im building an advanced search form. Im doing it with filter querysets, but I need to pass it two or more models to the form. How can I achieve it? Until now, I have this but with some troubles:
def post(self,request,*args,**kwargs):
…

dfrojas
- 673
- 1
- 13
- 32
0
votes
1 answer
Haystack, SearchQuerySet().filter is not returning anything. ( django + elastic search)
my code looks like following. here SearchQuerySet().filer is not returning anything.
search_indexes.py
class sample_index(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
books =…

Tanuj
- 298
- 1
- 5
- 15
0
votes
1 answer
Export Haystack search results
I am trying to export the results of a user's search. I am using Django + Haystack + Solr to produce the search results. Currently, to create the SearchQuerySet to write out the CSV, I am passing the query parameters from the search results page to…

sashafr
- 33
- 6
0
votes
2 answers
haystack 2 SearchQuerySet with filter by list matching with exact string
How can I filter by string list in haystack 2.0?
In Haystack 1.2 with Solr, if I have this code:
result = SearchQuerySet().models(MyModel).filter(my_field__in=['A', 'B', 'C'])
Result will exactly return objects with my_field equals to 'A', 'B' or…

emigue
- 492
- 3
- 13
0
votes
1 answer
Using a Haystack Result within Django ORM
I am filtering userprofiles via their interests using Haystack. How can I use Haystack's result to query a model to return me all selected users belonging to these userprofiles?
Right now I am doing it the following way, but it is really slow, as…

Matthias Scholz
- 1,015
- 1
- 13
- 25
-1
votes
1 answer
How to create model for search for multi table in yii2
I want to search in a multi table in yii2. How to do this action?

Saltern
- 1,305
- 2
- 16
- 42
-3
votes
1 answer
working on search queries in R
I'm new to R, but try to analyze dataset
Here is the original link https://cache-default03g.cdn.yandex.net/download.yandex.ru/company/jobs/test_data_dreams.txt
My code is (I use R Studio 0.99.903 & R 3.3.1)
# get the data from url
url <-…

Yevgenyia Yusova
- 21
- 3
-3
votes
2 answers
Check if search query is entered or not
I made a search bar for my website with bootstrap everything is fine now the problem is that it can also be used when nothing is entered.
So how can i check for that with php and also add a min letter to search.
Just give me a rough idea that what I…

Rajendran Nadar
- 4,962
- 3
- 30
- 51