I am using SharePoint 2013. I have edited the search content webpart on the search page. I have configured this webpart to show only items from contenttype "Customers". It works. When I search now on for example "Microsoft", I get all the items where the search key word "Microsoft" is available in the columns "Title" and "Description". But I have a custom column "CompanyName". I would like to check this column for the search result. How can I implement this?
2 Answers
- the column needs to be Indexable
- Under administration console of SP > Service Application > Search Service Application
- Search Schema > New Managed Property
- Create your property
- Run a full crawl
- Go to your centre search site (usually:
http://mymachinename/search
) and try do to a search on that column to understand if it comes up - Add the value on your JSLink, WebPart or wherever you need it
Then you can search using the Keyword Query Language like this:
CompanyName:"Microsoft"
-
And how can I exclude the Title and description columns from the search? I dont want that SharePoint search on the search keyword in the "Title" and "Description" columns. Only in my custom column "CompanyName"– OlaCommented Apr 23, 2014 at 11:04
-
Change the Query in the Search Results Web part to read: CompanyName:{searchTerms}