Questions tagged [content-search]

Questions about searching (querying) Sitecore projects with the ContentSearch API. Use the Lucene or Solr (or Coveo) tags if the question is specific for any of those technologies.

Filter by
Sorted by
Tagged with
6
votes
1answer
603 views

Lucene: sort by numeric field

I am trying to sort results by a decimal field, but it doesn't work. I need to use the property name indexer on the standard SearchResultItem so that it can be dynamic. return queryable.OrderBy(i =&...
6
votes
1answer
930 views

Why Multilist with search is not showing data in case of data source content setup in multilingual?

We have found one issue when we add a data source to the field MULTILIST with search it works fine but in case if we add a new language version for that data source then it’s giving only first three ...
6
votes
1answer
2k views

Solr and multivalue fields

I have a field in Sitecore that contains data such as "2010,2011,2012,2013" or "Europe;Asia;Africa;Artic" etc. These are string fields and don't need to be anymore than strings. These fields come from ...
5
votes
2answers
888 views

Combining multiple Items into one Document

Sitecore indexing works great for simple indexing scenario's, as the main working entity is a sitecore item. With computed fields you can add custom logic and fields for a record. But I have 2 more ...
5
votes
1answer
3k views

Help with ContentSearch LINQ query syntax

Here is my scenario: Bucket of sitecore items of a specific template This template has a field tags(which is a treelist) where you can associate x items there. I'm building a query using lucene to ...
5
votes
1answer
840 views

Dynamically filter on number using LINQ

I have numeric fields that I want to filter on with a range, however, these need to be dynamic using the SearchResultItem's property indexer. The code I'm currently using is: var predicate = ...
5
votes
1answer
417 views

How to use both Lucene & Solr with Brightcove?

In our project, we are using Brightcove videos, currently brightcove media framework supports only Lucene. But we need to use Solr for the site search, and other functionalities. How do we enable ...
5
votes
1answer
235 views

How do you perform a ContentSearch using the “MoreLikeThis” handler?

We have a Solr index and using the standard Linq queries. I noticed that Sitecore supports Solr features like Suggester or Highlighter, but I did not find anything about MoreLikeThis feature. I'm ...
5
votes
2answers
192 views

Solr auto-suggest brings all data in the website

I'm using Solr auto-suggest with the SXA search box, it's working perfect but with two issues, first it brings suggestion for all data in the site without any limitation, I want to limit to a search ...
5
votes
1answer
215 views

Sitecore_list_index on CDs

What exactly is the sitecore_list_index used for? Can it be deleted or can its crawling strategy be set to manual on CDs without affecting any other part of Sitecore?
5
votes
2answers
780 views

Lucene _language field TOKENIZED - how do I search on language?

In our Sitecore site we have a few 'English' languages: en en-GB en-US We wanted to do a search using the Lucene index (a custom one, but that doesn't actually matter) and included the language in ...
5
votes
1answer
251 views

Can the Auto suggest results count be changed in SXA?

I'm using Sitecore 9 update 1 with SXA 1.7, I configured the auto suggester in the Solr, the suggest.count is 30 and the maximum predictive results count for the SXA search box is 30 also, but the ...
5
votes
1answer
158 views

Exception while switching Lucene to Solr 4.1 on Sitecore 7.2

I am attempting to switch an instance of Sitecore 7.2 from Lucene to Solr on my local machine. I followed a well written guide detailing the steps, but I can't make it work. My environment: ...
5
votes
1answer
1k views

“There is no method 'Filter' on type 'Sitecore.ContentSearch.Linq.QueryableExtensions' that matches…”

I'm re-posting because the other thread on with 'GetResults' instead of 'Filter' SOLR error message is in a different context. This thread was when migrating from 8.1 to 8.2, while we are migrating ...
5
votes
1answer
1k views

Search component in SXA

I was playing around with the ootb search components in SXA and I got some results so yes, it's working. But now I wanted to know what was all included in the searchable content (apparently computed ...
5
votes
1answer
211 views

Can I set up Sitecore ContentSearch to use a separate Search- and Requesthandler on SOLR per site?

As the question says; do I have any options of setting/defining my own Search- and Request-Handlers for Sitecore ContentSearch, based on the active site? Skimming through ContentSearch configs, I'm ...
5
votes
1answer
179 views

Setting Up Query Elevations

This is related to Solr QueryElevationComponent component usage, but I'm looking for information on getting elevation setup. I see some other questions involving Solr query elevation. Is there ...
5
votes
2answers
264 views

Internal search doesn't work after configuring solr

The internal search stopped working. It was working fine until I configured Solr. The changes I made are : Disable all Lucene configs except the DefaultIndexConfiguration.config and enabled all Solr ...
5
votes
0answers
215 views

Atomic update of a SOLR document. Updating fields on document instead of full reindex of document

SOLR has a feature for doing partial updates of a document called Atomic Updates. The SOLR documentation has this example: { "id":"mydoc", "price":{"set":99}, "popularity":{"inc":20}, "...
5
votes
0answers
220 views

Check if boost rule has been applied to an item

I am implementing functionality to push certain items in my content tree down in search results depending on a "discontinued" checkbox field. I have created a rule item under /sitecore/system/Settings/...
5
votes
0answers
177 views

Dynamic Date Comparison in Search filter

Using Sitecore 9.01 and SXA 1.6 , we are trying to create search scope that filter News item based on their dates , so each News item has start and End date and we need to display only not expired ...
4
votes
2answers
3k views

Sorting Solr items query by Sortorder field

When bringing back items from Solr via the ContentSearch API it's not possible to maintain the content tree sort order as this isn't returned as a field by default. How do I order by results by the ...
4
votes
1answer
983 views

Config patch/hack to temporarily disable index update

Is there some easy config patch or hack I could make which would disable all indexing activities? I want to do this for things like package installation and also deletion of large content branches ...
4
votes
1answer
775 views

What's the difference between a Virtual Field and a Computed Field?

I've been using computed fields forever when I need to build a custom type of functionality that doesn't exist as a physical field in Sitecore when using ContentSearch, but I was just reading about ...
4
votes
1answer
277 views

ContentSearch Where vs Filter

When using the ContentSearch API what is the difference in using Where vs Filter and can this have any influence on the results? From the Sitecore documentation : Filtering is similar to using ...
4
votes
2answers
721 views

Buckets search page: Facets showing by guid. how to change that?

I have create a new facet for a categories field for a bucketable item. This field is a treelistex which means the user can select multiple categories for an item. Each category is an item with a ...
4
votes
2answers
222 views

Is the entire Sitecore tree indexed during indexing, or just the content node

As per the title, during indexing, does Sitecore index the whole of the content tree (content, layout, media library, social, system, templates)? Is the section of the tree which is indexable ...
4
votes
1answer
492 views

Hide a page from search results in SXA

Is it possible to mark a page as hidden from search results in SXA 1.8 Sitecore 9.0.2? I have a scope defined where the particular page template is allowed but there are exceptions when I would like ...
4
votes
1answer
239 views

SOLR datetime fields not readable

In my SOLR index, all my datetime fields have encoding in them and not date data. I have compared my configs with a vanilla Sitecore 9.0.1 and find no differences. So it seems like it must be a ...
4
votes
1answer
1k views

PredicateBuilder not adding any filters at all

I am trying to put together a very simple predicate builder - I only have one predicate for now. But as far as I see in the logs, it isn't applying any clauses at all. This is what I have: using (var ...
4
votes
1answer
128 views

SXA Search box algorithm

I want to change SXA search box algorithm to support exact matching, when I search with a work like "National Day", it returns results that contains "National" or "Day" or "National Day", I want it to ...
4
votes
2answers
674 views

Programmatically adding items to a custom Solr Index

I'm trying to add some items to a custom Sitecore Solr index Programmatically via the Sitecore Content Search APIs. The items I will add won't reside in Sitecore so the code below is just a test for ...
4
votes
3answers
316 views

SearchResultItem cant access to Statistics

I have the following POCO class: using Sitecore.ContentSearch; using Sitecore.ContentSearch.SearchTypes; using Sitecore.Web.UI.WebControls; using System; using System.Collections.Generic; using ...
4
votes
2answers
480 views

Sitecore Search Facet based on Path

I'm quite new to search facets with sitecore. I'm trying to implement a search facet with lucene, where I need to categorize results based on the Parent of the child items. I tried to use the ...
4
votes
1answer
626 views

Checking For Template Inheritance In An Index

Is there a built in way to get all items in an index that inherit from a base template? I've seen a custom solution doing something similar to what is described here and was surprised there wasn't a ...
4
votes
2answers
229 views

Coveo Facet View only showing up 2 Tags instead of all

​I have created 4 tags in Sitecore at Sitecore/System/Settings/Buckets/TagRepository. I have added Coveo Facet View rendering on the page and selected Tags field in the properties. It is only showing ...
4
votes
1answer
612 views

Boosting template based on search term

What is the best way to boost a template (in standard values?) when a specific search term is entered? eg. when a user searches on "training events" I would like to boost all "Event" template pages. ...
4
votes
1answer
146 views

Azure Search duplicate results for multilingual countries in same site with different language versions

We have a multi-lingual site where the group of countries (say for example Asia Region) is hosted in one Site folder. Thus Home, Pages, Settings have different language versions (zh-HK, en-HK, en-AU)...
4
votes
2answers
870 views

How are boosting values used for sorting when searching against multiple boosted fields

How are boosted fields handled in Sitecore ContentSearch when there are multiple indexed fields with different boosting values? Is there some formula to calculate the result ordering and is this ...
4
votes
1answer
494 views

ContentSearchAPI items array relevancy ranking

I'm trying to implement a tagging functionality that allows the content editor to add tags for a specific component and the c# to search for items containing a given set of tags Let's say our ...
4
votes
2answers
642 views

Best way to check Lucene index for query function

I've got a QA and live environment in 8.1 Update 2 using Lucene; both are running standalone. The same content is essentially on both, migrated via serialization from another instance. I'm using a ...
4
votes
1answer
305 views

How to get the page of a rendering used in a page in search

I have to implement Azure search but would like to try with Lucene first in the local setup. I am following this example by @kamsar 1.Created the SubcontentField class 2.Created the patch config and ...
4
votes
3answers
912 views

Multilist fields and Azure Search

I'm working on a Sitecore Azure PaaS instance using the Azure Marketplace ARM template which sets up Azure Search. For much of the project things are OK, but I'm having difficulty with Multilist ...
4
votes
1answer
258 views

How to detect Search Results rendering DOM update

There is a way to attach to an event which will inform us when the search results have been loaded from the server. We can do it like this: XA.component.search.vent.on("results-loaded", function (...
4
votes
1answer
2k views

Sitecore Multilist with search field searching wrong index

I'm having a weird issue where my Multilist with Search field is searching my custom index instead of the sitecore_master_index for items contained in the custom index. The multilist field source is ...
4
votes
1answer
870 views

Azure Search and Date fields

I'm using 8.2 Update-3 with the Azure Toolkit 1.1, deployed to Web App. I've got a template with a Date field on it, and I took a search class that works with Lucene and Solr like this: [IndexField("...
4
votes
1answer
440 views

Can I use automatic dependency injection with computed search fields in Sitecore 8.1?

I am creating a custom computed content search field that has one dependency: ISearchSettings. I'd like it to be injected via constructor: public class CustomField : AbstractComputedIndexField { ...
4
votes
1answer
392 views

Using .Between on a SearchResultItem field

I have requirements to create a search interface that allows the end user to perform faceted search against an index. One of the requirements is to be able to do a range query against certain fields (...
4
votes
1answer
765 views

Predicate not filtering out same ID in Lucene query

I have a query that's supposed to return related articles to the current article that aren't the current article but are the same category. However, it keeps including the current article in the ...
4
votes
1answer
823 views

Filtering with Solr in Sitecore 8

Need your help in filtering. We have documents tagged to categories as below: d1 tagged to 1 ,3 & 4 and d2 = 2 ,6 & 7 I need to output as below: User selects category 1 and 2 and then ...

1
2
3 4 5
9