Questions tagged [search]

331 questions
15
votes
2 answers

How can I display search "excerpts" from multiple sections?

How do I create search result page "excerpts" when there are multiple sections/fields that need to be represented?
Anna_MediaGirl
  • 2,503
  • 2
  • 17
  • 45
10
votes
2 answers

Excluding fields in a search

Is it possible to exclude some fields when using search? Getting the q parameter from the URL and searching the products section including all fields: {% set query = craft.request.getParam('q') %} {% set results =…
10
votes
1 answer

Ignore fields in search index

I have a site with ~ 25000 entries, and around 130 custom fields. I tried to rebuild the search index and it didn't complete after 8hours of running none stop. Whilst I'm sure this can be blamed on the Server to some degree, I can see that my…
dave_agilepixel
  • 309
  • 1
  • 10
8
votes
2 answers

Filter based Search Form

Previously on EE I've used Low Search to generate a filter based search form, based on categories. But with Craft I can't seem to find an add-on - Or even know if I need one! What I'm trying to achieve is a filer menu with categories e.g.: [ ]…
Jason Mayo
  • 878
  • 5
  • 18
6
votes
3 answers

How would you recommend integrating craft with Algolia

Has anyone had experience integrating craft with algolia: https://www.algolia.com for realtime search of craft entries. It seems like there are a few potential approaches with their Php and Js libraries. Does anyone recommend a particular approach…
Matt
  • 339
  • 1
  • 2
  • 7
5
votes
3 answers

How do I get extracts in search results?

Say someone searches for "John Smith". Using the search results template on the Craft website, my search results are then a list of titles for entries that include the term "John Smith". For example: Dave Taylor wins award New building built The…
5
votes
1 answer

Best way to effect part word searching by default

I want to use the standard site search but much prefer that (first) part word search is in place by default. By this I mean if a user searches for dog they will also find dogs, so the term Craft uses would then be dog*. My strategy would then be to…
Jack McKenzie
  • 753
  • 5
  • 20
5
votes
0 answers

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 currently have the matrix field checked, but the Form…
darylknight
  • 3,290
  • 18
  • 42
5
votes
1 answer

Bug with non-ascii characters, quotes and OR operator in search?

There seems to be a bug when I combine non-ascii characters, quotes and the OR operator when searching. All of these queries work ok: "pølser" "pålegg" pølser OR pålegg "egg" OR "spekemat" but "pølser" OR "pålegg" always returns no result.…
gromgull
  • 631
  • 4
  • 12
5
votes
1 answer

Search order "Score" criteria

Leading on from this question by Chris Lewis I can't seem to find anything on the technicals, but by what criteria "best-match to worst-match" calculated? For example, if I was to have, an entry with the title "Top Trees" then "Top Trees" I would…
Simon Clayson
  • 611
  • 3
  • 11
5
votes
1 answer

Is there a way to reduce the search index?

Our search index table (craft_searchindex) is over 500,000 rows and it takes a few hours to index. We have 11 languages, and each is being fully indexed. It takes a few hours to complete. Are there any ways we can reduce the search index size (e.g.…
Richard Frank
  • 643
  • 5
  • 11
5
votes
1 answer

multiple search

My question could seem obvious but I don't find the solution. How to make a search on two fields, like: craft.entries.section('pages').search('foo:bar foo2:bar2') I tried search('foo:bar', 'foo2:bar4') search('foo:bar and foo2:bar2') none of these…
Julien
  • 51
  • 3
4
votes
2 answers

Building Results From Advanced Search Form

I'm building an advanced search form and having some difficulty with getting the results. The form inputs include price and year ranges. For example, search for used cars from $10,000 to $20,000. The search is working, here's my results page…
R0wan
  • 335
  • 1
  • 2
  • 11
4
votes
1 answer

Search Results In a Drop List/Popup on Same Page

Does anyone have an example how I would implement search results that appear in a popup on the same form (without redirecting to a results page). The idea would be that as they start to type in the search bar, after a delay I'd show a popup with a…
Tim
  • 355
  • 1
  • 8
4
votes
1 answer

Advanced Search with tags and categories

Been scratching my head for the past day on how to implement search with multiple categories. At the moment, I have product categories as a select dropdown which only allows to search in one category at a time. This is passing the value as a…
Jose
  • 103
  • 6
1
2 3 4 5