Search engine is not working

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/5/2011 5:12:45 AM
Gravatar
Total Posts 16

Search engine is not working

On my installation, the Lucene search engine does not work. I get the same result (No matches found) without error messages when I'm signed out of the site as when signed in. I read Rebuilding the Search Index but /Data/Sites/[SiteID]/index is empty. Any ideas?

System informations:
mojoPortal 2.3.6.2 MSSQL
S.O. Microsoft Windows NT 5.2.3790 Service Pack 2
ASP.NET v2.0.50727 in 'Partial Trust'
W. Europe Standard Time
URL http://www.eumed.it/home.aspx.

Another question. Is it possible configure the search engine so that users can find things in search that they should not be able to see based on their role membership?

Thank you.

3/5/2011 6:09:30 AM
Gravatar
Total Posts 18439

Re: Search engine is not working

Just like your other post about shared files this indicates file system permissions are not correct. It cannot write to the index folder or it would create files there.

Hope it helps,

Joe

3/6/2011 4:59:16 AM
Gravatar
Total Posts 16

Re: Search engine is not working

The control panel of my hosting shows the permissions set correctly, but the problem with shared files has been fixed by adding manually the directory  History. Can I do something like this for the search function?

3/6/2011 5:13:16 AM
Gravatar
Total Posts 18439

Re: Search engine is not working

You could try deleting the /Data/Sites/1/index folder then re-create it with correct permissions then try rebuilding the search index.

You might also see this blog post from Arvixe hosting, it has a video about setting file system permissions and it also talks about how sometimes after upgrading you have to re-set the permissions. Maybe the guidance in the video would be helpful in your hosting environment as well.

http://blog.arvixe.com/setting-folderfile-permissions-for-mojoportal/

Hope it helps,

Joe

3/6/2011 7:53:03 AM
Gravatar
Total Posts 16

Re: Search engine is not working

Thanks, Joe. I followed your suggestion. I have deleted and manually re-created the folder /index. I also re-set the permissions but the research does not show results and the folder is empty.
If I delete the folder /index and do a search, the folder is automatically re-created, but is always empty.
I have to give up?

3/6/2011 12:41:42 PM
Gravatar
Total Posts 18439

Re: Search engine is not working

Are you seeing any errors in the log related to indexing?

If you click the button to rebuild the search index you should at least see a bunch of INFO level logging after the task starts running.

It can take several minutes before any files appear. It queues a task on abckground thhread that first queues all the content to be indexed into the mp_IndexingQueue table and then it processes the rows in that table to write to the index.

Do you have any settings in user.config related to disabling the search index or the task queue?

Hope it helps,

Joe

3/6/2011 3:56:58 PM
Gravatar
Total Posts 16

Re: Search engine is not working

If I click the button to rebuild the search index, I see this:

  2011-03-06 22:27:38,812 INFO mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread

Nothing else. I also checked the log after 15 minutes.

In user.config, for the search function I have only this:

  <add key="ShowRebuildSearchIndexButtonToAdmins" value="true" />
  <add key="DisableSearchFeatureFilters" value="true" />
  <add key="SearchUseBackwardCompatibilityMode" value="false" />
  <add key="EnableSearchResultsHighlighting" value="false" />
  <add key="SearchIncludeModuleRoleFilters" value="true" />

3/7/2011 12:11:09 PM
Gravatar
Total Posts 18439

Re: Search engine is not working

are you seeing any data in the mp_TaskQueue and mp_IndexingQueue tables?

Can you verify that in mp_Sites the SiteGuid field is not an empty guid?

I've seen in some installations where there is a problem with file system permissions for XmlSerialization, because it compiles temporary files down under Windows\Temp.

You can configure t to compile them in a site local folder but you need to know the file system path. If you look in Web.config near the bottom you will see it commented out:

<!-- the below example can be useful if you encounter the error described in this post
  http://www.mojoportal.com/Forums/Thread.aspx?thread=6741&mid=34&pageid=5&ItemID=3&pagenumber=1#post27613
  -->
  <!--
  <system.xml.serialization>
    <xmlSerializer tempFilesLocation="D:\__projects\mojoportal\__code\joedev\Web\Data"/>
  </system.xml.serialization>
  -->

you could try un-commenting it if you know the file system path that maps to /Data

XmlSerialization is used to serialize the task and the index items into the database.

Hope it helps,

Joe

3/7/2011 4:44:13 PM
Gravatar
Total Posts 16

Re: Search engine is not working

The mp_IndexingQueue table is populated and mp_TaskQueue is empty. The SiteGuid field in mp_Sites is not empty.

I modified the Web.config as your suggestion with the exact path and I got this error (in italian):

---

2011-03-07 22:37:59,135 ERROR mojoPortal.Web.mojoBasePage - 79.34.59.251-it-IT - /SearchResults.aspx?q=economia
System.UnauthorizedAccessException: Accesso alla directory TEMP negato. L'identità "WEBS184\ti.demue" con cui viene eseguito XmlSerializer non dispone di autorizzazioni sufficienti per accedere alla directory TEMP. CodeDom utilizzerà l'account utente utilizzato dal processo per eseguire la compilazione, pertanto se l'utente non ha accesso alla directory TEMP, non sarà possibile eseguire la compilazione.  Utilizzare Path.GetTempPath() API per scoprire la posizione della directory TEMP.
   in System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   in System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   in System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   in System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
   in System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   in System.Xml.Serialization.XmlSerializer..ctor(Type type)
   in mojoPortal.Business.SerializationHelper.SerializeToString(Object obj)
   in mojoPortal.Business.WebHelpers.IndexWriterTask.QueueTask()
   in mojoPortal.Web.SiteUtils.QueueIndexing()
   in mojoPortal.Web.UI.Pages.SearchResults.InitIndexIfNeeded()
   in mojoPortal.Web.UI.Pages.SearchResults.DoSearch()
   in mojoPortal.Web.UI.Pages.SearchResults.SetupInternalSearch()
   in mojoPortal.Web.UI.Pages.SearchResults.Page_Load(Object sender, EventArgs e)
   in System.Web.UI.Control.OnLoad(EventArgs e)
   in mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
   in System.Web.UI.Control.LoadRecursive()
   in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2011-03-07 22:37:59,166 ERROR mojoPortal.Web.Global - 79.34.59.251-it-IT - /SearchResults.aspx?q=economia
System.UnauthorizedAccessException: Accesso alla directory TEMP negato. L'identità "WEBS184\ti.demue" con cui viene eseguito XmlSerializer non dispone di autorizzazioni sufficienti per accedere alla directory TEMP. CodeDom utilizzerà l'account utente utilizzato dal processo per eseguire la compilazione, pertanto se l'utente non ha accesso alla directory TEMP, non sarà possibile eseguire la compilazione.  Utilizzare Path.GetTempPath() API per scoprire la posizione della directory TEMP.
   in System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   in System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   in System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   in System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
   in System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   in System.Xml.Serialization.XmlSerializer..ctor(Type type)
   in mojoPortal.Business.SerializationHelper.SerializeToString(Object obj)
   in mojoPortal.Business.WebHelpers.IndexWriterTask.QueueTask()
   in mojoPortal.Web.SiteUtils.QueueIndexing()
   in mojoPortal.Web.UI.Pages.SearchResults.InitIndexIfNeeded()
   in mojoPortal.Web.UI.Pages.SearchResults.DoSearch()
   in mojoPortal.Web.UI.Pages.SearchResults.SetupInternalSearch()
   in mojoPortal.Web.UI.Pages.SearchResults.Page_Load(Object sender, EventArgs e)
   in System.Web.UI.Control.OnLoad(EventArgs e)
   in mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
   in System.Web.UI.Control.LoadRecursive()
   in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

---

After that, the mp_TaskQueue table shows data.

 

4/27/2011 6:31:28 PM
Gravatar
Total Posts 23

Re: Search engine is not working

Same problem whit no error and no error in log  www.coroliricoterreverdiane.it 

4/28/2011 2:35:05 PM
Gravatar
Total Posts 16

Re: Search engine is not working

Salve Marco. Rispondo in italiano.

Vedo che il tuo sito è su Aruba. Ho effettuato numerose prove ma ho risolto il problema da pochi giorni, dopo un'installazione pulita su un dababase vuoto, rivolgendomi al loro servizio di assistenza. Dopo il loro intervento consigliano di rigenerare l'indicizzazione del sito, come riportato su:

http://www.mojoportal.com/rebuilding-the-search-index.aspx

In alternativa (ma non l'ho provata), consigliano di rinominare la cartella  ../Data/Sites/[1]/index/,  crearne una nuova e attribuire i permessi di lettura e scrittura tramite il Permission Manager.

 

You must sign in to post in the forums. This thread is closed to new posts.