Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [search]

The tag has no usage guidance.

1
vote
2answers
81 views

Search query for entries doesn't seem to work correctly

In my project I have a tickets which are edited in multiple steps where each step has it's own front end for. Now, of course. to continue editing an ticket I am required to fetch that exact ticket. ...
0
votes
0answers
12 views

Why is this entry query overwriting? [duplicate]

edit: for TL;DR; on related, I used clone(entry.matrixSlug) I have a type of matrix block I am trying to iterate through in the layout in order to pull out success notifications. The critical code of ...
1
vote
2answers
21 views

how to search for entries where a custom field is either not present or is empty

Some of my entries have the optional plaintext field myCustomField. I want to retrieve all entries except those where myCustomField is filled out. I can get all entries that have an empty ...
1
vote
1answer
19 views

How to exclude certain fields from .search()

I have an event section in my website with a couple of fields on the entries and one of them is a "related events" field where I can select a other event entries to be shown at the end of the page. I ...
1
vote
0answers
110 views

Element API SearchQuery to search for value inside child-entries

I currently try to use the Element API to build a search. Unfortunately I'm kind of stuck. I have a baseEntry, that has a field that references entries (let's call them subEntries) of the section ...
0
votes
0answers
26 views

Search weighting

Is there a way to control the weighting of certain fields in Craft when using search in the front-end? I have a Products Channel which I am trying to search against and I want to be able to boost ...
1
vote
1answer
66 views

Using multiple 'search' parameter values to filter entries

I'm trying to filter entries down based on keywords and also if they have selected a letter that matches the first letter of an entry title on Craft 3. So far I have this: {% set keywordParam = ...
1
vote
2answers
68 views

Search products and entries with pagination

Is there any way of searching both entries and products at the same time? Wanting a single search on the site which will return all entries and products containing the searched for phrase. Looked at ...
1
vote
1answer
23 views

Is it possible to search an asset filename stored on a remote Amazon S3 volume?

I'm successfully using the .search element attribute to search asset filenames stored locally. {% set mediaExists = craft.assets.folderId('6').search('filename:' ~ vLogID|slice(0, 5)) %} Is it ...
2
votes
2answers
41 views

Query Craft CMS Table Field for exact values

Am I correct in saying you cannot search for specific text in a table field. e.g. Table Fields Might hold the following data: SKU1 SKU2 SKU3 SKU33 I then want to search for items that only return ...
2
votes
0answers
75 views

Searching for Multiple Categories and Tags

I've been pulling my head for the past day on how to filter products with multiple categories. After a long search, I found and implemented on my project, Advanced Search with tags and categories It ...
1
vote
1answer
26 views

How can I make related entries and globals part of the search considerations?

How can I make related entries and globals part of the search considerations? So I have a website search bar that searches the whole website. Within some jobs pages there are some global elements ...
2
votes
2answers
105 views

Filter entries by Field value using a variable

How do I filter a list of entries by the value of a field using the value of a variable? e.g. {% set location = block.locationVacancies %} {% set entries = craft.entries.section('careers').search('...
0
votes
0answers
52 views

How to exclude some fields from the searchindex using the RegisterElementSearchableAttributesEvent event?

Context I had big issues on a Craft 2 multilingual site with dozens of thousands of entries that were using Matrix fields. The site had become extremely slow (almost unusable), especially when ...
1
vote
1answer
23 views

Search return wrong result with special character like æ ø å in Craft 3

I had created search in Craft 3, but it returns wrong result when I enter some special characters in it, for example æ ø å. Looking for the solution.
1
vote
1answer
83 views

Search using Slug as query parameter

I created Search that uses entry slug, but it fails if the slug has more than one dash "-" in it. Has anyone come across this and/or have any ideas for getting around it? I need to use the slug ...
0
votes
0answers
60 views

Ordering search by score and a custom field

I've got a product search results page which works great and orders results by searchScore. However, I need to also allow for "priority" results based on a custom lightswitch field. I'm setting a '...
3
votes
1answer
250 views

How to fetch entries in custom plugin Craft 3?

I am creating custom search based on entries. I need to fetch entries in custom plugin.
1
vote
1answer
42 views

Search in checkbox field with pagination

It seems like this should be a simple thing, but it's evading me... I have a checkbox field in my entry named "articles_categories". Just to clarify, these are not actual categories -- they are ...
0
votes
0answers
13 views

How to pass Paginate results into a map

I have a a Google Map followed by paginated search results as list items. I'm using the same results object to populate the map and the search results list: {% set results = craft.entries({ ...
2
votes
2answers
84 views

Search all Sites on Multisite

I have a multisite setup and and a search bar at the top of each site. Currently it just searches within that site: {% set theSite = craft.app.request.getSegment(1) %} {% paginate craft.entries....
2
votes
2answers
93 views

Search with string, entry type and category

So I have been asked to build a resource center just like hubspot's. (insert rolleyes here) https://www.hubspot.com/resources You can click into a type, and then click at topic and it creates a url ...
-1
votes
0answers
51 views

Trouble displaying multiple parameters in search

Having trouble displaying multiple parameters in search results. My query strings result in correct results when I search ?regions=white-mountains or ?seasons=spring but not when they're concocted ?...
1
vote
1answer
21 views

Search for href parameter in rich text field

I'm trying to find using craft search "bitly" urls in body rich-text field in articles. It's for generation of list of popular articles. So if query is a link (like "http://bit.ly/1eZFQMY") search ...
3
votes
1answer
56 views

Craft 3: Search in 15000 entries

I have a low-budget project where would like to migrate an academic website to Craft. The website contains 15000 proverbs about women in different cultures that can be searched, (http://www....
2
votes
1answer
44 views

ANDing search terms

I have implemented the standard search form at: https://docs.craftcms.com/v2/templating/search-form.html and added fuzzy searching: {% set entries = craft.entries({ search: { query: query, ...
0
votes
0answers
53 views

Searching for multiple tags with the relatedTo parameter's 'and' / 'or' arguments

I'm trying to get the code in this part of the docs—the "Passing Multiple Relation Criteria" section—working, but something's screwy. The mySection section has multiple tag fields. One field has a ...
1
vote
1answer
197 views

Paginate search results after combining sections in Craft 3

I have installed the Calendar plugin and I'd like to search across event entries from this plugin and from channel/section entries across the base Craft 3 site. However, I am getting the usual Limit-...
1
vote
1answer
124 views

Search Through Matrix Field

Trying to search through a Matrix field, currently I am using conditionals to accomplish this, but if it's faster would like to limit the results to only what I need. {% for row in entry.matrixField....
0
votes
1answer
96 views

ElementAPI : Excluding terms from search criteria

I am trying to exclude terms in my search when using the element api. I have successfully managed to include terms and search them by fields in my entries. I would now like to be able to exclude ...
0
votes
2answers
102 views

Searching Number Field To See If It Falls In A Range

I'm building a property search form and searching by different types of fields in Craft. Here are my questions: How can I get a list of the unique cities in the entries section to declare my form ...
0
votes
0answers
19 views

Search function quirks

I first thought this was an anomaly with my search form results. But, I am seeing the same behavior in my Craft 3 control panel when searching entries. Here is a good example. I have an entry with ...
1
vote
1answer
272 views

Search Multiple Fields Same Parameter

I'm building a search form with filters. This is one of the filters. I would like to use the parameter "agent" and have it search a text field called "listingAgent" and "coListingAgent" to check for a ...
0
votes
2answers
200 views

Filtering search with checkboxes multiple param querystring

I have a series of checkbox like so: <fieldset data-role="controlgroup"> {% for option in craft.fields.getFieldByHandle('area').getFieldType.options %} <input type=...
4
votes
1answer
343 views

Craft 3 Multi Category and Field Search

Looking for the solution to searching entries in one section that are related to multiple categories and match number field criteria. This is for a used auto website. Categories: Make/Model/Trim: ...
0
votes
0answers
30 views

Search results missing items

I did a straight lift of the Craft3 Search Form example. It "works." There are no errors. But, it is not showing all results. I can type F and it works. I type F- and it works. I type F-15 and it ...
1
vote
1answer
33 views

How to get a result from search even if the search query contains a part of title?

Suppose there are three Entries: Entry One Section One Channel One I need to get Section One in result when I search Sect. Is this possible ? I am using {% set entries = craft.entries.search(query)...
3
votes
1answer
118 views

SmartMap - how to search by a field in address?

I have entries using the SmartMap address field. I need to get just the entries that have a combination of city and state (city = "Beverly Hills" AND state = "CA"). I am currently only trying to get ...
1
vote
1answer
416 views

syntax error, expecting variable (T_VARIABLE) in Search Plus Custom Mapping

I’m looking for a little help with Custom Mapping for the Search Plus plugin. I think(?) I'm getting pretty close, but stuck on something (and I do front end web design, so this is just over my head) ...
1
vote
2answers
80 views

Search query: grouping and merging multiple searches

Is it possible to 'group' search logic in the craft.entries.search query? I need to do the following: [a OR b OR c] AND [d OR e] AND [x OR y OR z] Thanks!
0
votes
1answer
177 views

Search with dynamic results

A couple questions... 1) How do these dynamic searches work? A excellent example is found at McMaster Carr website 2) Is there any search plugin like that for Craft? I did not see any.
1
vote
1answer
69 views

How to include search results where keyword input exists only as a category title?

I have a request to extend an existing "advanced search" form (multiple fields, including keyword and a categories dropdown) so that entries with a category that matches the keyword input are returned....
1
vote
1answer
82 views

Search and link to Entries Matrix Field

I'm trying to create somewhat of a clever search for which only searches through certain pages of my site. At the moment, it can search those pages, but instead of the result returning the page name, ...
1
vote
1answer
66 views

RelatedTo in plugin based search

$criteria = craft()->elements->getCriteria(ElementType::Entry); $criteria->section = 'stories'; $criteria->search = $this->query; $criteria->order = $this->orderSql(); $criteria-&...
1
vote
0answers
116 views

Category counts for query results

I'm trying to display results from a search. I want to display the categories represented by the search results and the entry count for that category. Think of how Amazon's "refine results" sidebar ...
1
vote
0answers
27 views

Commerce filter with width, height and length with tolerance

Hope you guys can help. I need to create a search feature on a craft commerce site that will allow the user to search for products in this principle: Product Type Width +- value height +- value ...
2
votes
2answers
369 views

Need no search engine tracking option in Craft websites

Can you let me know what the process would be? I heard there was a no track tag we can put in the site header so the sites won't show up in search engines.
1
vote
1answer
66 views

One select search for Users in user.group

I'm a complete newby on Craft CMS and twig templating so please bear with me. I currently have a users base which I want to filter by category (a custom field) This would be my only input search ...
1
vote
3answers
184 views

Search/Filter Freeform submissions by field value

I need to be able to get a count (in the frontend) of the number of submissions that have a field with a specific value. I don't need the submitted data of the submissions, just the count of ...
1
vote
0answers
216 views

Debugging Craft search query: differences between craft.log and dump()

I'm new to Craft, coming over from ExpressionEngine to start doing maintenance on an agency-built Craft site, and I have what may well be a very basic question... please be gentle. We have a page ...