Developer Forum »
Override searchindex
10 posts

Hi

 

Iam working on a project where I wish to overrite what is being stored in the public index.

For that I have made a property of type Change inherited, and there chosen the Parent attribute.

In the settings tab I have activated the Included in public indexed field and removed the check, thus leaving it unchecked.

After a full rebuild, I delete the search index and rebuild it.

 

Now I have a test node which is completely empty other than it's name which is Menypunkt #1 and it's parent which is Selge Bolig.

Now when I do a search and log on what is being found in the body this is the reault:

menypunkt #1 selge -----bolig----- #menypunkt-1 ...

Allthough I would expect it not to have found my node. Can you tell me what I need to do to omit searching in the name of the parent node?  

p.s I am using version 1453

Regards   Christoffer Andersen

181 posts

Hi!

I've tried to recreate the problem, but it works for me, both when using version 1230 of the basic demo site, and after updating it to the latest Webnodes version (1455).

The steps I've done:

  • Verify that if you search for the name of a node with children, the children are also listed. In the basic demo site I searched for "News". That returned three results, the News node and two children.
  • Then I went to the Ontology module, and on the NewsItem class that inherits from ArticleBase, I click the "New property" button. I then give the property a name, and select the "-> Change Inherited" option. Then I select the Parent property in the next dialogue.
  • Then I open the new change property, open the Settings tab, activate the "Included in Public Index" setting, and then I uncheck the checkbox.
  • Then I do a Hot rebuild, so that Webnodes reloads the altered settings. 
  • Then I go to the system module, and on the Indexes menu, I first do a "Delete search index".
  • Then I do a "Rebuild search index".
  • When the "Indexing queue" returns to 0, I try to search for "News" again. This time it returns only one result: the News node itself, as we expect.
  •  

    Does this differ from what you do?

    10 posts

    Hi

    It turns out, that it wasn't enough to delete the search index through the webnodes settingspage, I had to go delete all the content in the folder manually. And then rebuid the searchindex, i suspect it's the segments.gen, segments_Number, that caused the problem.

    Those are not erased with a delete searchindex.

     

    So if anyone have this problem, simply manuel delete all content in the searchfolder (located under app_data) and then do a rebuild searchindex

     

    Regards

     

    Christoffer

    1