Questions tagged [search]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Leave search term active in control panel

i have to edit entries with the same titles. That's why i search for these titles in the search bar of the control panel, edit the first entry, save it and then search again for the same titles and ...
1
vote
1answer
32 views

Filtering by lightswitch fields

Bit of an unusual one and sure must be missing something but know if we have a defined lightswitch field we want to filter against it can quite easily be done so like this: {{ craft.products().myField(...
0
votes
0answers
33 views

Adding custom “keywords” to the search index

Is it possible for us to manually inject our own keywords into the searchindex via an event or something? eg. Event::on(Entry::class, Entry::EVENT_AFTER_SAVE, function (ModelEvent $event) { $event-...
1
vote
1answer
22 views

Craft search only shows results matching 'title' of entries

I´m doing a search on Blog entries, i want to get all relevant entries searching on several fields, and seems that only matches the title. I try already using search(query), now i added the fields, ...
0
votes
0answers
15 views

Getting mixed results with key word searches

I am having a hard time understanding why some keywords in fields that are marked as "Use this field’s values as search keywords" are not showing in the results but others are. For example, ...
1
vote
1answer
30 views

Query entries with latest video field containing a URL

I would like to set up a query to find the latest news article that has a video attached to it ('video' is a matrix field with a block type that is also called 'video' and a field called 'videoUrl'). ...
0
votes
0answers
8 views

Adding a specific field to search() parameter that contains an object

I'm currently running a search which contains an object {query:query, subLeft: true, subRight: true} {% set query = craft.request.getParam('q') %} {% set entries = craft.entries.section('example')....
0
votes
0answers
41 views

Search results not showing all entries

I have a search results page that doesn't show all matching results. The result entries that do show appear to older entries that have smaller ID numbers, although I'm not sure if that has anything to ...
0
votes
0answers
44 views

Return message when no users are found in element index page

How can a 'no users are found' message be displayed when the search returns no matching results in index page ?
1
vote
1answer
24 views

Search form - Passing only field params that are not empty or selected

Is it possible to have a search form pass (into the search query) the field params of only fields that have been populated/selected? For example, if the following form is submitted, both q and color ...
1
vote
1answer
29 views

Within the CP, how can I filter the listed Entries based on a Lightswitch field value?

I tried these kind of searches in the CP search field (on top of the Entry list): fieldHandle:true / fieldHandle:false fieldHandle:1 / fieldHandle:0 fieldHandle:* / -fieldHandle:* fieldHandle:not 1 / ...
0
votes
1answer
28 views

Inconsistent search results in multi-site setup (prod/stage)

I have set up a staging site alongside production just like the docs describe (Craft Solo 3.4.24). I have copied the "Site Settings" for all sections and set the "Propagation Method&...
0
votes
0answers
40 views

Optimizing working Code — reduce the loop

I have the current situation and already a solution for it. But I'm not feeling very well as it seem to have an unecessary loop? Situation Structure: itemCategories Category A Subcategory B ...
1
vote
1answer
53 views

Comparing matrix blocks by type and field value

I’m trying to do something, the answer to which should be as simple as searching a Matrix field value but that’s not working for reasons I can’t fathom. Setup I have a Matrix field called programme. ...
0
votes
0answers
19 views

Updating Search Indexes failing because of “rouge” invalid field handle

I'm on the latest build 3.5.3. I created a Lightswitch field type within a Matrix field in my local dev env and called it "colorBlock". No problems there. When I recreated this in my staging ...
1
vote
1answer
23 views

Filter users: in group AND not in other group

Please could you advise on how to filter a user query, so that users from Group A are included, but not if they are also in Group B? {% set vnp_users = craft.users .group(['groupA', 'not groupB']) ...
1
vote
2answers
45 views

Search not searching certain words - how to fix?

I have an entry about the U.K. TV show "Being Human". If I search "being" on the back end, it comes up with 0 results, same on the front end search. Searching for "Human" ...
1
vote
1answer
28 views

Searching on whole title returns no results

When a client site is searched by the whole title, the search results return zero. If I search by a few words in the entry title then the entry is returned in the search results. If i search with the ...
0
votes
0answers
13 views

How to search/filter in CP by date range?

Is there a way in the control panel to list all entries with a date field between two dates? For example, last updated between 12/16/2019 and 2/15/2020. Interested in doing this for both automatic ...
2
votes
1answer
43 views

How to search against a specific field/s, and not every field related to an element?

I have the below. I want to only show results that contain the query in the the username or fullName attributes. Because currently if I search for say Tom the search results will return users without ...
2
votes
1answer
38 views

Filtering a Matrix block for future dates

I'm struggling with filtering future dates in a Matrix block that contains a date field. I would like to display 'Open' or 'Closed' as the result of a condition checking if the value of matrix rows ...
0
votes
0answers
42 views

Search Results not working as expected

I have a search results page set up where there are a number of parameters in the query string used to filter results. I've got 3 out of 5 of these working and am stuck on the final 2. My full ...
1
vote
1answer
29 views

How to search based on a Multi select category field in Craft 3?

I have a blog section with multi select categories. I want to filter all the blogs based on that multi select categories in the website. When I tried .search('category:ui-ux OR category:web-designs')...
0
votes
0answers
21 views

Add additional entry fields to backend search

The search field in the craft backend entry section searches the title and slug field by default. Is it possible to add custom entry fields to this search function (in my case e.g. a custom item ...
1
vote
2answers
45 views

Frontend Form Search Users based on Tags

Context: I'm trying to build a search form that will filter users based on Name, Skills and School. Users who have any of the search criteria should appear in my results. Name Is a fuzzy keyword ...
0
votes
0answers
29 views

Apply search filter in Element API

I have managed to build the search filter structure at the twig, but I get stuck when try to convert this structure in element API, {% if craft.request.getParam('query') %} {% set keyword = craft....
1
vote
1answer
180 views

Graphql total results / pageinfo when searching with pagination

I'm trying to build something to search my data that is stored in Craft with graphql. To make pagination work I want to know how many results there are in total. I'm doing a query like this: query($...
0
votes
0answers
38 views

Entries search parameter for date value in matrix field no longer working in Craft 3

We have a large festival events site where each performance is stored in a matrix field called dates which uses a single block which has a datetime field (date only). So if an event is on 3 different ...
0
votes
0answers
46 views

Search for category and title in Element API for Jquery Autocomplete

I'm working on the search Autocomplete based on this article, http://craftsnippets.com/articles/search-autocomplete-component-for-craft-cms Besides the title, I want to search within the category too....
0
votes
0answers
15 views

How to search for certain links in Craft backend?

There are a few bad links in my craft site, pointing to some docs in another wp-content site. How do I search for them? I've seen https://docs.craftcms.com/v3/searching.html#supported-syntaxes but ...
0
votes
0answers
25 views

Best way to display relevant matrixblock fields when doing a sitewide search?

I'm building a custom search results page which returns not only the entries that contain the search query (searchQuery), but also, the actual text/content in which the search query was found. That ...
1
vote
1answer
54 views

Optimising search query

I was wondering if there is a better way to do a query like this, it takes a long time to execute and I know setting the parent variable is where there's a problem but am not sure of an alternative ...
1
vote
1answer
17 views

Setting a field search variable after main entries variable changes values

Kind of hard to explain but here's an example: {{entries.all()|length}} {# outputs 88 #} {% set hasTopic = entries.search('dataTable_topic:*').all() %} {{entries|length}} {# outputs 7 #} How can I ...
0
votes
0answers
26 views

Craft search using criteria with related

In the element API following has been defined. $criteria = [ 'section' => $settings['section'], 'limit' => $settings['limit'], 'offset' => $settings['limit'] * ...
2
votes
1answer
52 views

Craft's control panel search function returning inconsistent results

When I search for titles of entries in the Craft control panel, I get odd results: I have an entry called Fake Story about the Economy. If I search for that exact title, I get no results. If I ...
1
vote
2answers
44 views

Is it possible to change the default search result order (CP)?

Craft version: 3.3.19 Is it possible to set default order for CP entry search results? The default is search score but for instance for blog entries, news, etc. the date of the entry is usually more ...
1
vote
0answers
88 views

How does “Use this field's values as search keywords” work with a Matrix field?

I'm fine-tuning a search results page and have noticed that "Use this field's values as search keywords" is included both on the matrix field itself, and within each block type / sub-field. I ...
0
votes
0answers
114 views

Craft and Algolia

I am trying to implement Algolia into Craft 3 and am having a few headaches. I am using scout to update my indexes which seems to be working as expected and am using the instantsearch.js ...
2
votes
1answer
50 views

Excluding specific field value from search

I want to find all entries that match the title field where excludeFromSearch != 1 (is false). {% set query = 'and excludeFromSearch not 1 and ' ~ 'title:"' ~ "myValue" ~ '"' %} {% set results = ...
0
votes
0answers
31 views

Manual Search Index

Any time after i use import with Feed me plugin Craft run updating search index, it takes so long time. For example in my new import have 2-3 articles, updating start index all my entries, i have ~50k....
1
vote
1answer
19 views

How to handle search results that point to a page of aggregated entries?

I have a few pages in my site that aggregate information, for example, a single awards page that gets all the entries in an awards channel. Single awards entries don't have their own URLs. How do I ...
0
votes
0answers
45 views

Filter Super Table Rows by Date Field

I have a Super Table field called locationPricing with a date field inside it called expiration. I want to only display the Super Table rows where the expiration date has passed. Here's what I've ...
1
vote
0answers
20 views

Search if Super Table Field Has Rows

I have a section with a super table field, and I only want to display entries in that section if the super table field has rows (so basically a "not empty" search). How do I do this? I tried using the ...
1
vote
2answers
33 views

Blank Screen on Site Search for some Search Terms

We are getting a really odd result when doing certain site searches. The search function loads a completely blank page when we search for the word Anaerobic; Looking at the source some of the ...
0
votes
0answers
104 views

Advanced Entry Queries

I'm looking to write advanced nested search queries in Craft. For example, below I'm looking to find results that have a featuredContent value of 1 and an endDate after today or empty. In psuedo code,...
1
vote
1answer
129 views

CraftCMS: Search entries by title in CMS

In the CraftCMS admin page at /admin/entries/, there is a search bar at the top: This search bar appears to only search the Body field of Entries. Is it possible to make this search bar match ...
1
vote
2answers
38 views

Search question: dot (period) and partials

We have a job inventory where the jobs are being saved as entries. When searching against jobs by keyword we search against two fields: the title and a job description field. However we are ...
1
vote
1answer
981 views

“Updating search indexes” message in admin sidebar

I'm noticing the following error in my admin sidebar: If I try to retry it just fails again. I can't see anything obviously failing in my logs. I'm not sure if this is related to the queue, but if I ...
1
vote
1answer
92 views

Searching for item SKU in Commerce orders

I'm trying to show some Commerce 2 order information on the front-end. I can't work out the correct syntax. I'm trying to list orders that include a specific product. I have orders for item SKU "...
1
vote
2answers
51 views

Issues with Craft Commerce [closed]

We have a dutch website build with Craft CMS and for the webshop Craft CMS Commerce. This has been done by a design company. We don't receive any orders and I am wondering if the whole process is okay....

1
2 3 4 5 6