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.
439
questions
2
votes
1answer
44 views
How to exclude an item based on template when using find-item in Powershell
I'm working on this script:
$criteria = @(
@{Filter = "NotEquals"; Field = "_template"; Value = "{A87A00B1-E6DB-45AB-8B54-636FEC3B5523}"}
)
$props = @{
Index = &...
1
vote
1answer
19 views
Where to get Azure search query logs to check a query?
We are using Azure search to get the Sitecore items based on some filter conditions passed as predicate. This condition is not working with Azure Search in our dev environment. We have to check the ...
1
vote
0answers
15 views
Ensure Azure Content Search Provider uses a filter for a query
We have a number of searches on our site that should be possible through a pure filtered search - we're searching across a few fields, some of which are mutli-selects, others are booleans and one's a ...
0
votes
0answers
12 views
Sxa Check list filter for single line text filtering as like operator not equal operator
I have a search results component. I want to apply the sxa check list filter. While applying over the single line text the unique value is coming properly along side check box but filter is not ...
1
vote
1answer
37 views
SXA Seach scope dynamically passing facet information
We have a requirement where we need to display the first two news items (sorted by time) and along with it there will be a link to view the rest of the news as well (this is page 1). If they click on ...
1
vote
1answer
51 views
Create custom facet for Sitecore SXA search filter
I have to apply the SXA search Checklist filter component on a search result by the product type (which is a single line text field).
Can anyone please provide any information or useful links on how ...
1
vote
0answers
25 views
SXA Search api doesn't work with Arabic facet value
I'm using Sitecore 9.3 and SXA 9.3, I use SXA OOB Search results components, when filtering with Arabic keyword in the facets, it doesn't bring data, although I checked the generated SOLR query, it ...
2
votes
2answers
53 views
Sitecore SXA search result count in scriban
Is there a way to read the search results count in a Scriban template in a rendering variant of SearchResult in SXA?
I have a requirement that if the search results count is less than 6 the result ...
1
vote
0answers
44 views
Sxa custom search token query for date range is not working in azure search service
I have Sitecore 9.3 SXA with Azure search in our application. We are trying to create a custom SXA search token to filter upcoming events starting from the current date. In the code am trying to pass ...
0
votes
0answers
22 views
Sitecore SXA search for redirect item
I am using Sitecore 9.3 with SXA and using the SXA search box and search results. I have redirect items under my home node, but when I try to search the redirect item name in the search box, it doesn'...
0
votes
1answer
24 views
Could not map index document field to property “Paths” on type Sitecore.ContentSearch.SearchTypes.SearchResultItem
Has anyone seen this error in the logs
Could not map index document field to property "Paths" on type Sitecore.ContentSearch.SearchTypes.SearchResultItem. Guid should contain 32 digits with ...
1
vote
1answer
54 views
Custom SXA search query Token is not behaving as expected
I have being working on Sitecore 93 SXA, and I'm creating a sxa search query token by extending pipeline ResolveSearchQueryTokensProcessor referring this blog to get the date field of item and compare ...
0
votes
1answer
68 views
Create LINQ to SOLR expression to get intersection or empty
Project computes semantic field with list of tags (stringArray).
Requirement is to search for items that tag list intersect with given set of tags.
But also if the item tags list is empty we would ...
0
votes
1answer
26 views
Filter search based on the page field of date type
In SXA Sitecore 93 I have a requirement to show items in search result, where date field on page is only greater than current date.
I am trying to create a custom sxa token just like we have: ...
3
votes
1answer
63 views
Boosting Search Results
I was disheartened to see this in the Sitecore docs:
Important
Search result boosting works in Solr version 6.6 or earlier, but Solr changed the implementation in Solr 7, and later versions. ...
0
votes
1answer
29 views
Create a predicate matching 2 lists
I have a multilist field (Product Category).
I am getting a list of Product Category from the session.
How can i write a predicate to filter all those items which has one common category without ...
0
votes
0answers
23 views
Rebuild index feature from CM not updating indexes on CD server
Lucence indexes are not in sync on CM and CD server which seems expected as per this post but for me even manual trigger is not working. I tried Index rebuild in Developer tab from top ribbon from ...
0
votes
0answers
35 views
No Results in Scope query(Build Search Query displaying no results)
I am adding scope into site under tenant in sitecore 9.3, When I build query in Build Search Query, it always shows 0 results. I also inherited templates from _Searchable template.
Indexes also added ...
0
votes
1answer
47 views
GroupBy clause for both search providers (Solr, Azure)
Would like to use groupby clause in Sitecore 9.1.1 for both search provide (Azure, Solr) in content search API. However, Sitecore does not support this clause. Kindly let us know how we can group ...
0
votes
1answer
29 views
Enable multi search without filter button in sxa check list filter
I am using sxa check list filter. For multiple category filter the filter button is coming automatically can anyone pls help to enable the multiple filter without button..
It seems that I need to ...
2
votes
1answer
45 views
Cannot search sxatags to find related items - 'undefined field sxatags'
Sitecore 9.3 with SXA. I'm trying to utilise sxa tags from the inherited _Taggable template to programmatically find related items with similar tags to the context item.
That SXA template is /sitecore/...
0
votes
0answers
28 views
Content search predicate with multiple conditions
Sitecore 9.3
I am trying to use 'predicates' to get a subset of data.
When I have the code snippet as:
using (var contextA = selectedIndex.CreateSearchContext())
{
var predicate = PredicateBuilder....
1
vote
1answer
25 views
Search API with multiple conditions
Sitecore 9.3
What I have till now:
I am able to filter items based on a template using the search context.
var unversionedImageTemplateId = ID.Parse(Constants.UnversionedImageTemplateId);
var ...
0
votes
1answer
35 views
Invalid Method Call Argument in Content Search
Sitecore version: 9.3
I am trying to fetch the media components with specific template and having a particular check-box selected using Sitecore query in my code.
I tried the following code snippet:
...
1
vote
1answer
33 views
How do I resolve the objectToSwitchTo error in Sitecore 9.3 with SXA on the ContentDelivery server?
I'm currently experiencing an issue in SXA where the log reports an error and no search results are returned.
3764 08:00:38 WARN Results endpoint exception
Exception: System.ArgumentNullException
...
0
votes
1answer
70 views
Solr computed index field of type stringCollection not stored as expected
I've made a computed index field in my solution. The class returns List<string> from the ComputeFieldValue method and the config patch includes the field within the fieldMap and documentOptions ...
1
vote
1answer
83 views
Re-use computed index field for multiple template fields
Is there a way to re-use the code for a computed index field without just making derived classes? I would like to have an additional property in the config which tells the ComputeFieldValue method ...
0
votes
0answers
47 views
How to add multiple field in search result facet
I am using sxa search result component
My Requirement is to sort the result by 2 field, one field check box named isimportant with high priority and second is updated date with low priority.
I have ...
0
votes
1answer
31 views
SXA JSON Results don't read from custom index
I'm using Sitecore 9.1 and SXA 1.8, I've created custom index instead of "sitecore_sxa_web_index", the Search Results component fetch data from the custom index and works fine, but the JSON ...
0
votes
1answer
38 views
Invalid cast from 'System.String' to 'Sitecore.ContentSearch.IFieldMap' [closed]
Sitecore version: 9.3
In my SOLR, the name of my master core is M7_master_index.
I am trying to get some result from Sitecore using search. So I am creating the SearchContext in the following ways:
...
3
votes
2answers
221 views
Solr tokenization to split on semicolon character
How do I go about configuring fields within a Solr index to be tokenized based on a semicolon ";" delimiter?
Initially, I had fields configured as such:
<field
fieldName="example&...
0
votes
2answers
60 views
Sitecore Solr multiple filter tagging / excluding
I am using Solr facets and I want to filter tagging and exclude it.
My query is :
https://localhost:8989/solr/rya_custom_web_index/select?q=*%3A*&fq={!tag=courseactivities_s:Dinghy}...
0
votes
1answer
57 views
Field rules in Search Scope is not working with tags field of my pages
I am using sxa sitecore 9.3, my requirement is to get search result on the basis of sxa tags on the pages,
for which I have applied query and rule in search scope. But the tag result is not accurate, ...
0
votes
0answers
19 views
One or several tag repositories for my site?
I have a Sitecore 9.0.2 site that contains a list of shops that are currently only searchable by shop name. We wish to improve the search feature by tagging up shops with:
Product categories (e.g. ...
0
votes
1answer
64 views
SXA Boosting by multiple query
I'm using Sitecore 9.1 and SXA 1.8, I'm using SXA boosting rule of where the field contains Search Box query, this rule doesn't work when the Search Box query is multiple words that are not in order.
...
3
votes
1answer
270 views
Handling special characters in SOLR search for sitecore 9.1
For a Dutch company, we implemented Sitecore SOLR search (Sitecore 9.1 and SOLR 7.2.1 ) with a requirement for the user to be able to search words with special Dutch characters for example if the user ...
0
votes
0answers
22 views
SXA Number Boosting rules
I'm using Sitecore 9.1 and SXA 1.8, I'm using SXA boosting rules for boosting results, but the field I'm using is not String type, it's Number type, so I used the Numbers operators instead of the ...
0
votes
1answer
84 views
Boost search results by field value
I'm using Sitecore 9.1 and SXA 1.8, Is it possible to boost the search results by a specific field value, what I see in SXA boosting rules that you adjust boost by adding a value statically, I want ...
1
vote
0answers
44 views
Exact search in Azure search in Sitecore SXA
Using azure search in Sitecore SXA 1.7 and it is not fetching exact result likewise if we are using "Test data" in search box then it is showing result based which match "Test data ...
0
votes
0answers
29 views
Solr query returns different sequence of data everytime based on its relevancy
On my page I have three sorting options and these are Newest,Oldest and Relevancy.
This relevancy returns the data from solr based on the relevance ranking in solr. Now this solr query itself is ...
1
vote
1answer
184 views
SOLR Spell checker not working well with multiple words
I'm using Solr 7.2.1, I'm trying to implement the 'Did you mean' feature, I've configured the spell check handler and it's working well, the issue is when trying with multiple words, if only one word ...
1
vote
0answers
113 views
How to get the exact match or sub string of the passed query in solr
I'd like to query a string to Solr and let it answer with all records which are a subset of that string.
The string is separated by comma. I wanna make solr to give me all records where a specific ...
0
votes
0answers
14 views
Checklist field result is not showing in Azure search in SXA [duplicate]
I am using content search API with Azure search provider for checklist field value. However, I am not able to fetch result with it as in checklist raw values are stored as multiple GUIDs with pipe ...
0
votes
0answers
101 views
Search checklist field data in the Content search API in Sitecore SXA
I would like to search checklist data through the Content search API in the Sitecore SXA. However, it is not searching any data based on checked value in checklist field.
Sharing code :
Template:
Name ...
1
vote
0answers
48 views
Not able to fetch search result in Content search API with Solr and Azure
I am using content search API in Sitecore 9.1.1. However, it is not fetching result if i am using search with any of the template field. The below code fetching result based on template id but when we ...
1
vote
1answer
94 views
Facet query returning 100 items max
Using Sitecore 9.2 with Solr on SearchStax. We have the Query.MaxItems value patched to 0, so finding a limit returned of 100 items is unexpected. We're setting up a number of dropdowns, using this ...
0
votes
1answer
117 views
IndexingStateSwitcher Job Never Ends
We are suddenly experiencing a problem with Sitecore never starting up. It looks like the last meaningful line in the log is that the IndexingStateSwitcher job starts, however, it never ends. In our ...
0
votes
0answers
27 views
SXA Filter API ignore the custom index
I'm using Sitecore 9.1 and SXA 1.8, I've created custom index for my site and it's working fine, the SXA OOB Search results API is using the custom index which is right
But the SXA OOB Search filters ...
1
vote
1answer
51 views
Use site specific search indexes configured on SXA site item in Content Search API
When making Content Search API calls, Sitecore resolves the index based on certain logic which is very well explained here.
In SXA, we do have an option to configure the indexes on the site item, ...
1
vote
3answers
146 views
The method 'Concat' is not supported. Declaring type: System.Linq.Queryable
I have two IQueryables that i need to merge. This is my code:
such that all results having region name "UK" will appear on top while all results having region other than UK will appear after search ...