OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Unable to Search only Title in Orchard Search Index

Open Syed-Hasnain-Askari opened this issue 3 years ago • 4 comments

I'm working on Orchard Search functionality, When I search on it then the result shows title along with banner image just like that.

image

but I need only to show Title which is actually part not field , my configuration is image I have also allow index option in Title part image

Know someone who can answer?

Syed-Hasnain-Askari avatar Aug 03 '22 14:08 Syed-Hasnain-Askari

You need to remove the "Analyzed" setting. The TitlePart will then stored in the "Content.ContentItem.DisplayText" but you will be able to do a full-text search on the "Content.ContentItem.Displaytext.Analyzed" field still.

Skrypt avatar Aug 03 '22 18:08 Skrypt

You also need to use the Orchard Core repository for issues, discussions and chat https://github.com/OrchardCMS/OrchardCore

sebastienros avatar Aug 03 '22 18:08 sebastienros

You need to remove the "Analyzed" setting. The TitlePart will then stored in the "Content.ContentItem.DisplayText" but you will be able to do a full-text search on the "Content.ContentItem.Displaytext.Analyzed" field still.

Thanks for your response. I have removed the Analyzed setting and applied Content.ContentItem.Displaytext.Analyzed on Default searched fields. like image

but it gives blank screen, while Content.ContentItem.FullText is working with banner imge.

image

I want to get Content.ContentItem.DisplayText like this but Content.ContentItem.DisplayText is not work on Default searched fields.

Syed-Hasnain-Askari avatar Aug 03 '22 21:08 Syed-Hasnain-Askari

Content.ContentItem.DisplayText.Analyzed will not display in the results because it is not a "stored" field. It is only "Analyzed" but I'm pretty sure it is there. You will need to use a "match" query on it instead of a "term" query.

Skrypt avatar Aug 04 '22 02:08 Skrypt