Questions tagged [search]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
62 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, ...
1
vote
1answer
314 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-...
2
votes
1answer
367 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
148 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
239 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 ...
1
vote
1answer
613 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
624 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
759 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
47 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
43 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)...
2
votes
1answer
207 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
621 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
150 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
515 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
112 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
125 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
101 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
346 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
34 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
698 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
84 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
303 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
349 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 ...
0
votes
1answer
113 views

Craft 3 beta - User group total

I have tried to find the new way get the total in a user group in php (plugin), but not having much luck... Please help Assume it starts with Craft::$app->users ?
1
vote
1answer
56 views

How to differentiate between positive and negative numbers in search

I discovered today that searching a custom field for a number will return results containing either the positive or negative versions of the number, even if I do an exact search. For example: ...
1
vote
1answer
89 views

CP search for entries by postDate?

Does the control panel search support postDate, expiryDate, dateCreated, dateUpdated? For a custom date field, the below will return all dates in October 2017: customDate:2017-10 But for entry ...
2
votes
2answers
485 views

Grouping entries by title in Craft 3

I need to group a set of entries alphabetically and I don't get a working and clean solution. Taking this documentation entry, I am doing it as follows: {% set fromAtoF = craft.entries.section('...
1
vote
2answers
186 views

Limit search by channel on the form rather than the results template

I'd like to use the same results template for all of my search functions so I'm wondering if it's possible to limit the search to a specific channel i.e. news or calendar in the form rather than in ...
3
votes
2answers
251 views

SearchPlus Plugin Not Syncing Indexes

For the past couple of months now, I've noticed on my websites using the SearchPlus plugin that indexes are no longer syncing with Algolia. This also means that creating new search indexes is not ...
0
votes
1answer
57 views

Entries from previous year 2016 not displaying

Ok, so this is pretty bizarre... Entries from 2016 are NOT displaying when searched for in the admin panel. Whether we search by the year, title, or part of the title, until they're edited (using the ...
1
vote
1answer
59 views

Load more images in matrix block

I have a matrix block called team that has an assets field within it that has all of the companies headshots. However, there are more than 30 images, but the design is to only have 6 showing on load, ...
0
votes
1answer
305 views

Searching on multiple checkboxes

I've got a question that I can't seem to get fixed all by myself... I've got a search form and each entry has got field with some checkboxes (in this case these are options). Now I'd like to search ...
1
vote
1answer
883 views

Simple AJAX search form

So I've been following the docs on how to create a search form in Craft and it works fine. But instead of having a results.twig page I would like to have just one index page and get all the results ...
1
vote
1answer
877 views

Filtering Search Results by Category

I'm currently trying to filter my search results by category, I've been following this tutorial but cannot get it to work. It keeps not adding on the category parameter, but instead just replaces the ...
1
vote
2answers
197 views

CP search for entries where a specific field is empty

In the control panel, is it possible to search for entries where a specific field is empty? The Craft search syntax page doesn't help here, and the logical values used in twig don't seem to work here. ...
1
vote
1answer
147 views

How do I pass a URL segment to a search parameter?

I'm trying to set up an archive page by passing dates in the URL to the entries search parameter to show events from a specific month. The eventstart is a custom date field. If I enter numbers i.e. ...
2
votes
1answer
1k views

How do I search craft.entries with multiple parameters?

I'm filtering entries based off a searchbar with multiple parameters, and I'm building up an entries filter based off of them. Everything works great except for having more than one .search functions. ...
2
votes
3answers
320 views

Possibility to use Craft's search function to search in PDF files

I have a client who wants to search for specific PDF files when she makes use of Craft's search function. The way she wants the PDF's to be found is that the words inside of the PDF is somehow ...
0
votes
2answers
116 views

Exclude entries by array of authors from ElementCriteriaModel

I'm trying to get a list of entries of a certain section, however I'd like to exclude certain users that are defined within a field of the entry. The users to exclude from the query are fetched like ...
3
votes
1answer
385 views

How to pull entries with Date Created > start and < end?

I'm building an export plugin in Craft 2 and the entries are saved by the front-end and are never enabled, so no Post Date. I have a form with the forms.date selectors that sends a start and end date ...
1
vote
0answers
28 views

Is it possible to list all searches with at least one result that were made on a site?

I want to submit a XML sitemap to Google with frontend searches, in order to boost the SEO for a site. This is the approach I would take. But then, I might be very naive and there's other techniques ...
1
vote
1answer
138 views

Search for the entry Id with the search form

A customer of mine has printed references of the entry Ids of their product. Now they want to have a search form on their website where it's possible to search either by the name or by entry Ids. How ...
2
votes
2answers
267 views

Grab first <img> or <img> src from Rich Text field

I've had the unfortunate task of importing thousands of entries in to Craft from Worpdress. Each of the entries has a Rich Text field and within the first couple of paragraphs there is an image. I ...
1
vote
2answers
246 views

Filtering dynamic criteria with AND

I have a form that is set up to include multiple values with checkboxes. I pass all those values into an array {% set specsQuery = craft.request.getParam('specs') %} {% set productSpecsCategory = ...
1
vote
1answer
62 views

Search then loop through files that were uploaded via FTP

Is it possible to search a server folder containing image and video files that were previously uploaded via ftp and then loop through those files in the entry template? Each entry has a unique Log ID ...
1
vote
1answer
207 views

Enforce search match multiple parameters

I actually found this code on here Search Form with Craft Commerce. I had a problem with this code pulling up products that didn't match, and then after creating a new product it worked for a bit and ...
1
vote
2answers
783 views

Is it possible to exclude entry from search index?

I have some pages that I want to exclude from search results. How can I do this?
1
vote
0answers
149 views

Range Facets with SearchPlus and Algolia

Currently using Algolia with SearchPlus on my setup. Unfortunately some data is quite clunky e.g. Prices with 23.93 48.12 etc. What I'm wanting to do is have range pricing/grouping where by I can ...
1
vote
1answer
262 views

Custom element type defineSearchableAttributes

I have a custom element type with 2 custom fields, 'name' and 'email'. I can't seem to get the index search working for this element type. I defined defineSearchableAttributes and returned an array ...
2
votes
1answer
309 views

Group entries by section, then order and combine sections

I'm grouping search results by section, based on Aaron Berkowitz's answer to this question. My code looks like this: {% set entries = craft.entries({search: {query: keywords} }) %} {% set ...