21 votes
Accepted

How does Sitecore decide the Index to use with GetIndex

When you call Sitecore.ContentSearch.ContentSearchManager.GetIndex(IIndexable indexable), it runs contentSearch.getContextIndex pipeline. In the version I'm checking now (it's 8.2 update 3), this ...
Marek Musielak's user avatar
  • 23.8k
17 votes

Do we have predictive search capability within Sitecore?

So this depends on what you mean by predictive search. If you mean a simple autocomplete, then yes. Sitecore provide an n-gram analyzer for both Lucene and Solr. To use this, add a new field to the ...
Richard Seal's user avatar
  • 20.4k
17 votes
Accepted

One index with multiple start locations

The generic crawler name is good when you will only have one crawler in your index. If you have multiple crawlers then you need to have nodes with distinct names: <locations hint="list:AddCrawler"&...
maz's user avatar
  • 1,813
15 votes
Accepted

Patching to remove index update strategies

You can use <patch:delete /> to achieve this. It will look like: <sitecore> <contentSearch> <configuration> <indexes> <index id="xxxxx"> ...
josedbaez's user avatar
  • 1,792
14 votes
Accepted

Gracefully handle Solr search connectivity issues

There is. Sitecore has open sourced a patch to fix this. The code is on github, you'll need to download it and build the patch against your version of Sitecore. You may need to adjust the code to work ...
Chris Sulham's user avatar
  • 1,458
14 votes

Sitecore Full Content Search

From what I understand, you are looking for a way to get the datasources that your current page is referring to to be indexed along with said page. Several times now we have used the approach defined ...
vandsh's user avatar
  • 1,651
13 votes
Accepted

Unable to connect to [http://localhost:8983/solr], Core: [mycore]

After spending some time in Sitecore logs and googling I decided to check Solr logs. In my case they are stored in C:\solr\solr-5.4.1\server\logs\ That was smart move. I immediately found a clue: ...
Dmitry Harnitski's user avatar
13 votes
Accepted

Is there a way to define index per site in SXA

Yes, it's possible. There is a new feature in SXA 1.7.1 which allows you to create an index per site and per language (and of course per database). On the Site Definition (/sitecore/content/...
Dawid Rutkowski's user avatar
12 votes
Accepted

What is the difference between an index and a search index

tl;dr: If you are on Sitecore 7.0 or newer, you should pretty much always be using ContentSearch indexes. If you are on Sitecore 6.X, you can only use the older Sitecore.Search.Index indexes. ...
Ed Schwehm's user avatar
  • 3,036
12 votes
Accepted

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

Virtual fields are processed at runtime. When you query the index with the Sitecore search context, the field is calculated and filled. A virtual field is not in the on disk index. Computed fields ...
Chris Auer's user avatar
  • 13.1k
12 votes
Accepted

Incorrect dynamic field type for Droptree

Just ran into the same issue with a Droplink. This definitely seems like a bug. My guess is that the indexing type is actually being set based on the return type of field reader associated with the ...
nickwesselman's user avatar
11 votes
Accepted

Items with fallback language missing in Content Search index

Sitecore has registered this as a bug and provided a custom SitecoreItemCrawler. The Sitecore issue number is 471497 and the public reference numbers for this issue are 124202, 103362, 127177.
Kevin Brechbühl's user avatar
11 votes

What is the difference between an index and a search index

There is no difference. They are the same thing. They are both defined in config files, and they both are accessible using the Sitecore search API. It comes down to how the index is used in the ...
Adam Conn's user avatar
  • 1,047
11 votes
Accepted

How does Sitecore update the Link Database?

An important note to start: the "Links Database" is a table named "Links" that lives inside a Sitecore database. It is not a separate database. Sitecore only updates the Link Database on the database ...
Ed Schwehm's user avatar
  • 3,036
11 votes
Accepted

Help with ContentSearch LINQ query syntax

To be able to search on a field in the Sitecore SearchAPI you need to add that field to a model. So you could create a new class derived from SearchResultItem and add your tags field in: public class ...
Richard Seal's user avatar
  • 20.4k
10 votes

What is the difference between an index and a search index

The "Rebuild Search indexes" will list the system index, used for searches in the Sitecore desktop. I think the reason that this one is separated from the other is to be found in older Sitecore ...
Gatogordo's user avatar
  • 20.1k
10 votes
Accepted

In the "Select Media" dialog, where are the search facets defined at in Sitecore?

I've researched this a bit myself and come up with the following answer. If there's a better, more general way of answering this for every dialog, or if anyone has more specific information about how ...
Justin Laster's user avatar
10 votes
Accepted

Unable to serialize the session state. Sitecore.ContentSearch.SearchTypes.SearchResultItem

Background What the error message means is that an object of type SearchResultItem could not be serialized as part of a session that is saved to a session store. There are two types of sessions used ...
Dmytro Shevchenko's user avatar
10 votes
Accepted

Combining multiple Items into one Document

From your description, it looks like you have run into the same predicament that all Sitecore developers inevitably run into with regard to Content Search indexing: why don't my data source items just ...
Zachary Kniebel's user avatar
10 votes
Accepted

What class indexes the _content index field

There is no config which you can change to adapt the logic. It's hardcoded. Sitecore.Search.Crawlers.DatabaseCrawler adds content to the _content field. In the AddAllFields method there is: item....
Marek Musielak's user avatar
  • 23.8k
10 votes
Accepted

Dynamically filter on number using LINQ

Figured it out: return predicate.Or(i => ((double)i[(ObjectIndexerKey)"price"]).Between(20, 40, Inclusion.Both)); Using the extension method: Sitecore.ContentSearch.Linq.Between The other thing ...
David Masters's user avatar
10 votes
Accepted

How to rebuild Lucene Index using API?

You should have a look at the documentation form Sitecore: https://doc.sitecore.net/sitecore_experience_platform/80/setting_up_and_maintaining/search_and_indexing/indexing/rebuild_search_indexes You ...
Thomas Bæk's user avatar
10 votes
Accepted

Multiple partial word search not working

As it is mentioned in documentation, Solr does not support the wildcard query (this is a type of query to which .contains("phrase") will be converted) for search phrases: Solr’s standard query ...
Artem Prashkovich's user avatar
10 votes

Sorting Solr items query by Sortorder field

I did this before on Lucene by removing the __sortorder field from the excluded fields list. And rebuild the index. I would assume this to work in Solr as well. Your config patch would look like this: ...
Gatogordo's user avatar
  • 20.1k
10 votes
Accepted

"Index sitecore_marketingdefinitions_master was not found" exception in Sitecore 9

It looks like the index is not initialized. Adding the following to the marketingDefinitionSolrIndexConfiguration should fix it: <initializeOnAdd>true</initializeOnAdd> Since the ...
Markus's user avatar
  • 309
10 votes
Accepted

Config patch/hack to temporarily disable index update

You could create a patch file that sets all the indexes strategies to manual, that would effectively disable any automated updates that might happen as a result of installing a package or other ...
Richard Seal's user avatar
  • 20.4k
10 votes
Accepted

Solr tokenization to split on semicolon character

You can use solr.PatternTokenizerFactory tokenizer to achieve this Define a new fieldtype in solr schema <fieldType name="semicolonDelimited" class="solr.TextField"> <...
Surya Narayan's user avatar
9 votes
Accepted

How to specify Solr core in search code for Sitecore 8.1

The indexes are defined in configuration, and the core for that index is specified in that configuration section. Here's the default 'sitecore_core_index' definition in an OOTB sitecore install (...
Chris Smith's user avatar
9 votes
Accepted

Sitecore Content Search not returning back fallback items

For future use: I found a solution for this, we need to enable language fallback for master and web indexes like below, and rebuild them. By default, this setting is set to false <...
Dheeraj Palagiri's user avatar
9 votes
Accepted

Sitecore Search API not searching List of Guids Unsupported expression node type

You need to create your Guid variable first before trying to filter FacetCategory on it, Something like: Guid facetGuid = new Guid(facet); containsQuery = containsQuery.Or(item => item....
Ahmed Okour's user avatar
  • 2,124

Only top scored, non community-wiki answers of a minimum length are eligible