This may be a simple question, but I have not found a solution in these forums yet...
I see that after configuring Umbraco Forms, a search index was created called UmbracoFormsRecordIndex. I already have a search working that seems to be using the "ExternalIndex" (this came with my UnSkinned theme). Where in the templates/code/configuration can I look to change it so it searches against the UmbracoFormsRecordIndex rather than the ExternalIndex?
I believe it would be a custom search? The theme I installed has a search on the front end that currently uses the ExternalIndex to search page content. I would like to override that search and return results from the UmbracoFormsRecordIndex.
I found the partial view that seems to control the results, and found this line:
ExamineManager.Instance.TryGetIndex(Constants.UmbracoIndexes.ExternalIndexName, out IIndex index)
Would it be as simple as swapping out that ExternalIndexName with the form's index? I guess I can't find where the Constants are coming from.
I think I'm on the right track, but I n eed to figure out what "Category" needs to be passed in to the CreateQuery method. "Content" works for the ExternalIndex, but it must be something else for form results.
Here is some of my code:
if (!String.IsNullOrEmpty(searchTerm) && ExamineManager.Instance.TryGetIndex("UmbracoFormsRecordsIndex", out IIndex index))
{
var searcher = index.GetSearcher();
var criteria = searcher.CreateQuery("content", BooleanOperation.And) ...
Search Umbraco Form Responses
This may be a simple question, but I have not found a solution in these forums yet...
I see that after configuring Umbraco Forms, a search index was created called UmbracoFormsRecordIndex. I already have a search working that seems to be using the "ExternalIndex" (this came with my UnSkinned theme). Where in the templates/code/configuration can I look to change it so it searches against the UmbracoFormsRecordIndex rather than the ExternalIndex?
Thanks! md
Hi Mike
What search do you want to use UmbracoFormsRecordIndex?
Is it a custom search or search in the Umbraco backend?
If it's a custom one you can easily use the needed index.
Thanks,
Alex
I believe it would be a custom search? The theme I installed has a search on the front end that currently uses the ExternalIndex to search page content. I would like to override that search and return results from the UmbracoFormsRecordIndex.
I found the partial view that seems to control the results, and found this line:
ExamineManager.Instance.TryGetIndex(Constants.UmbracoIndexes.ExternalIndexName, out IIndex index)
Would it be as simple as swapping out that ExternalIndexName with the form's index? I guess I can't find where the Constants are coming from.
Thanks! md
I think I'm on the right track, but I n eed to figure out what "Category" needs to be passed in to the CreateQuery method. "Content" works for the ExternalIndex, but it must be something else for form results.
Here is some of my code:
is working on a reply...