SaaS CMS has officially launched! Learn more now.

Index pages for Episerver search

Vote:
 

I'm using Episerver search on a website where we are having a few issues. It doesnt seem to index all the pages. We have approximately 15 pages that are of the same PageType. When we index them and then search using a word that all of them have in a property we named "Header" not all of the pages are returned in the search result. Could anyone help me with where to start troubleshooting? I downloaded Luke - Lucene Index Toolbox hoping that analyzing the index files will get me somewhere.

Cheers!

#82617
Mar 17, 2014 11:09
Vote:
 

Hi,

Make sure you have the correct url configured in web.config and that you can access the service. This is done in the setting /configuration/episerver.search/namedIndexingServices/services/. It seems like you already have done that though.

Then make sure you have decorated all appropriate properties as searchable, by adding the [Searchable] attribute to them.

And then reindex all your content here http://siteurl.com/uiurl/cms/admin/indexcontent.aspx. You can also republish a page to trigger a new indexing of that page.

#82651
Edited, Mar 17, 2014 19:12
Vote:
 

Hi,

We have tried all of that without any luck at all. I have submitted this as an incident to the episerver support who are looking into it atm.

#82930
Mar 21, 2014 14:07
Vote:
 

Hi Isa,

Did you find a solution to this?

I have a related problem where the Search service returns results only from specific page properties, not all.

I have a page type with the following properties:

  • Page Title (String)
  • Sub Title (String)
  • Content Body (XhtmlString)

But when I search for content, only text that appear in subtitle and contentbody (last two properties) get returned.

It looks like the Page Title content is not being indexed at all.

I made sure to add the [Searchable] attribute on these properties but I am still experiencing this issue.

Help would be greatly appreciated!

Thanks,

Nicola

#131526
Jul 29, 2015 15:04
Vote:
 

Nicola,

Did you do a reindex after adding the searchable attribute? For a test you can try and republish a page, as that will reindex that page, and search for it.

/T

#131532
Edited, Jul 29, 2015 18:07
Vote:
 

Hi Tony,

Yes I have reindexed after adding the searchable attribute.

I've also tried publishing the page but this particular property just seems not to be included at all in the indexing.

Thanks

#131533
Jul 29, 2015 18:32
Vote:
 

Hi Nicola,

That's strange. I would download LUKE (some versions of LUKE works better than others) and browse the index and see if the value is even in the index.

/T

#131534
Jul 29, 2015 19:03
Vote:
 

Hi Toni,

I have downloaded LUKE and could confirm that it is being indexed.

I went to debug the code and found that a set of data is actually being returned from SearchService.Search() method as IndexResponseItems.

However, when it tries to create Hit models, it fails gracefully in the background and returning null results in the frontend.

This is the code that has the problem:

var content = _contentSearchHandler.GetContent<IContent>(responseItem);
if (content != null && HasTemplate(content) && IsPublished(content as IVersionable))
{
                yield return CreatePageHit(content);
}

content is null and hence it doesn't yield anything. It's the ContentSearchHandler.GetContent() that fails to convert the Index item into an IContent instance.

I could not step into the code any further as this method is part of the EPiServer.Core dll.

Still stuck :-(

#131536
Jul 29, 2015 20:20
Vote:
 

That's a good step forward at least.

The documentation for the GetContent<T> method mentions this:

"The Id of indexItem must start with a guid that matches a page."

http://world.episerver.com/documentation/Class-library/?documentId=cms/7.5/B19C3414

Can you check to make sure that the Id is a guid that exist in the database? Check tblContent and the column ContentGUID.

Also, see if error logging is enabled in EPiServerLog.config and check your logs.

/T

#131537
Jul 29, 2015 20:25
Vote:
 

Thanks Toni for your help so far.

Yes the Id of the index item does start with a guid but for some reason it does NOT exist in the tblContent.

I tried the next few ones and all of them don't exist as ContentGUID in tblContent. What does that mean? The search result is not of type PageData or Block at all right?

The 1st set of results = 40 (Max size) but they all don't seem to be of type IContent.

I enabled the error logging and set to ALL, but there are no errors being recorded when I do a search of a text that I know exists but don't get any results for.

#131540
Jul 29, 2015 21:02
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.