Questions tagged [wagtail-search]
24 questions
2
votes
0 answers
Wagtail PostgreSQL search backend shows warning "MyModel.search_fields contains non-existent field" yet is fully functional and operates as expected
Hi thanks for your help in advance!
On a wagtail 2.2.2 project I recently added search functionality with PostgreSQL search backend. It was working great until I tried running a search on a filtered PageQuerySet by given tag whichs throws this…

audeos
- 336
- 2
- 6
2
votes
0 answers
Wagtail: Searching page and parent with backend db
I am new to Wagtail/Django. Getting start was quite easy and I got my application up and running quite easily. However I ran into a problem when I was searcing. The application is quite small and I would like to use the backend db (or MSSQL).
I…

Gimmy
- 21
- 2
2
votes
0 answers
wagtail and elasticsearch does not support __icontains?
I want to be able to search in one of my custom page models.
The search should exclude all predefined page.id which are in a list, and also exclude where the page.url_path contains a certain value.
For example:
from django.db.models import Q
# The…

Igoranze
- 1,506
- 13
- 35
1
vote
1 answer
How to do partial matching on searches with PostgreSQL in wagtail?
How to do partial matching on searches with PostgreSQL as search backend?
I'm running wagtail 5.0 and I see the following statements in the documentation
The partial_match option has been deprecated. To index a field for partial matching, use…

Kippster
- 11
- 2
1
vote
1 answer
Wagtail 4.0.1 Admin/Search not working with Postgres PostgreSQL 12.12 Database
I have this issue related to the pages search, on the admin side of wagtail. This is the Django Error:
ProgrammingError at /admin/pages/search/
function ts_rank(unknown, text, tsquery) does not exist
LINE 1: ...ry"."body") @@…

Diego Portillo
- 103
- 1
- 7
1
vote
2 answers
Wagtail RichTextBlock extend to pick color
I am trying to implement a color-chooser option in wagtail RichTextBlock so that I can select any color for my selected text.
This is my wagtail_hooks.py file:
@hooks.register("register_rich_text_features")
def register_colortext_feature(features):
…
user12551055
1
vote
1 answer
Searching Pages and custom models at the same time in Wagtail
I made a blunder - implemented some models in our application as plain Django models (but Indexable) instead of Page models.
Now the client would like to see a unified search results page (so a faceted search is not adequate)... so I am completely…

Roodie
- 247
- 1
- 8
1
vote
0 answers
Searching wagtail images
I'm implementing a image rich webapp with wagtail and elasticsearch. To search for images I want to use elasticsearch and the built-in capabilities of wagtail to index and search for images.
The images in wagtail are tagged and I want to use those…

paweloque
- 18,466
- 26
- 80
- 136
0
votes
0 answers
Wagtail Page model transitive search on custom fields
I have two fields inheriting from the Wagtail Page models, such as:
class ModelA(Page):
custom_field = models.CharField(max_length=255)
search_fields = Page.search_fields + [
index.SearchField("custom_field")
]
class…

Brylie Christopher Oxley
- 1,684
- 1
- 17
- 34
0
votes
1 answer
Wagtail 3.x postgres search returns no results
I recently updated from Wagtail 2.13.5 to 3.0.3. After the update, the search() method on Wagtail's PageQuerySet returns no results for search terms that clearly should return results (and which do when using the older version).
For example, under…

nttaylor
- 788
- 3
- 11
- 25
0
votes
1 answer
I want to search streamfield in admin panel?
I have about 400 different types of blocks. How can I search for them from the admin panel?
Example image:
Example search form admin panel

StudentMan
- 1
- 1
0
votes
2 answers
manage.py error after Wagtail 2.15 upgrade
After upgrading to Wagtail 2.15 (or 2.15.1) from 2.14.2 my production website with postgres and database search breaks and commands that are run with manage.py give an error despite me adding the required WAGTAILSEARCH_BACKENDS to settings.
I have…

stickyfoot
- 3
- 4
0
votes
1 answer
SearchFieldError - Cannot search with field "body". Please add index.SearchField('body') to Page.search_fields
I have a elasticsearch backend (7.14.0) and wagtail (2.14.1) and I want to include a fulltext-search at the body field of my page. When search something in frontend, I get
SearchFieldError at /search/
Cannot search with field "body". Please add…

Andre
- 623
- 2
- 9
- 20
0
votes
1 answer
Wagtail: How to perform site-wide search with custom SearchField declarations in subclassed pages?
I'm using the built-in Wagtail search with POSTGRES backend. I don't want to go to Elastic Search as this would be overkill for the site concerned.
The problem I'm hitting and can't find any info on is how to perform a site-wide search that includes…

Rich - enzedonline
- 746
- 4
- 10
0
votes
1 answer
How to fix error 'str' object has no attribute 'relative_url'
I am trying to pass some wagtail contexts to the search page of a django project. The post title appears but the image, description and other parameters do not appear in the search template. How do I pass these contexts to the search template?
This…

Al4321
- 89
- 11