Open jaysonsantos opened 11 years ago
Hi!
Currently, is not possible search on foreignKeys relations, but is possible to implement. I put this feature to my todo list for this package.
Thanks.
My dirty local fix is:
query = StoreProduct.objects.select_related('product').extra(
where=['products_product.search_index @@ plainto_tsquery(%s)'],
params=[form_data['q']])
So good, this solves the problem. But it would be nice to integrate a solution in the package.
Furthermore, the fields kwarg on search method indicates to a manager not use a vector field. Be careful with this.
Do you plan on implementing this feature? It would be very cool.
This was difficult to do in django <1.7, but it will be implemented support for django 1.7 using custom lookups.
@linuxlewis do you think this feature will be added sometime soon? This would be super useful for a bunch of projects I'm collaborating on :)
ie.:
One office can have a lot of products, and in this case i have to find products on store and ideal world would be:
Is there any way to do that?