eZSearch seems to be ignoring custom RootMediaNodeId
Hi,
Using eZSearch and it is all working as expected. However, when i specify a specific folder ID within the macro to specify which root node to use, it returns no results but if i leave it as standard to search all media, it returns the correct items.
The idea is to have a folder that is only searchable by the public. I have had this working previously but doesn't seem to be working on my current site.
I haven't made any changes myself to the two examine config files. I have also tried different nodes and it doesn't work unless i don't specify one and it uses the default "All media".
Is there anything in particular that could be causing this?
I've just booted up a new build with the starter kit and installed ezSearch and it works out of the box.
Can you put this code
<pre>@query.ToString()</pre>
above (around line 115)
var criteria2 = criteria.RawQuery(query.ToString());
and then see what gets written out to the page. This should show you the lucene query that is being constructed. You can then test this query against the index directly in the back office. Navigate to Developer -> Examine Management -> Searchers and expand ExternalSearcher -> Search Tools. Toggle the Lucene Search radio button and paste in the query that is written out to your search page here.
If this isn't returning anything, I suggest it hasn't made it into your index, or the query is broken.
Just to clarify 2519 is the Id of the folder node that contains the media image called "High Rise"?
From the Examine Management tab, can you open up the ExternalIndexer -> External Index & Tools and click rebuild index.
Is this a new site or a mature site? It could take a while to rebuild based on how many nodes you have to index, but I'm assuming you're working on a dev version at the moment. If not, you may want to choose a time to rebuild the index when less busy.
On the text search radio button of Examine Management Searchers, try putting in High Rise and see if it is in the index.
Correct, 2519 is the Media folder with content we want to be able to search. This folder contains the High Rise image which returns in the results if we DO NOT specify a rootMediaNodeId.
I am currently using a dev copy of the site. Using the Text Search also returns the images before and after rebuilding the indexes but still no luck on the front end.
I have also done a Text search for that specific folder and that appears with the correlating ID's.
I don't know whether media uses metaTitle rather than the nodeName - that certainly wasn't my understanding but hey!
When you do your back office Examine Management query and it returns the media image "High Rise" in the index, could you copy that into the thread so I can see what fields are in the index please.
NodeName seems to exist. This is a weird one and i cannot figure out what is going wrong here. Both the folder and the child image exists in the index and the ID's in the index are the same as it is in the media section.
Not sure where to go from here. I have added a new "Searchable" folder and added a new child image. Rebuilt the index and this is visible on the Developer Index searchers. However, the new image is not being returned on the front end using the ezSearch with or without a rootMediaNodeId. Could there be a possibility that there is two indexes here? It feels like the ezsearch is using a different index to what Umbraco is.
Can you just check you have a file called Our.Umbraco.ezSearch.dll in your bin folder?
Basically my thinking is like this - Lucene struggles with hyphens/dashes (-) in fields unless using the right analyser (can't remember it off the top of my head) so nodeName might not return what you're expecting here. However, ezSearch adds an additional field "contents" to the index that I can't see on your output here. This is basically most of the fields space separated so it can search easier.
Unfortunately, the dll exists! I have searched to see if any other files are missing and the only thing i can see is the ezsearch config within the installedpackages.config file.
Would this have any affect? Apart from that i can't see any issue.
I've made some progress with my version, and get it to throw a similar error - it looks like ezSearch is still set to find the umbracoFile directly being set rather than checking if it is an ImageCropper (and therefore stored as json).
Thank you, I just tried adding in the changes that you have mentioned but still no luck! I don't think this issue relates as this still wouldn't work when an ID isn't provided for the rootMediaNode?
Apologies for the delay. I still haven't found the work around for this so please if you do find something please share. I had tried all steps discussed above but no luck :(
eZSearch seems to be ignoring custom RootMediaNodeId
Hi,
Using eZSearch and it is all working as expected. However, when i specify a specific folder ID within the macro to specify which root node to use, it returns no results but if i leave it as standard to search all media, it returns the correct items.
The idea is to have a folder that is only searchable by the public. I have had this working previously but doesn't seem to be working on my current site.
Thanks in advance :)
Umbraco v7.12.4
Kind Regards,
Gary Henshall
Hi Gary,
This seems to be working for me - have you changed your examineIndex.config or examineSettings.config files at all?
Have you tried specifying and different node ids to see if it is just that specific node causing an issue?
Many thanks, David
Hi David,
I haven't made any changes myself to the two examine config files. I have also tried different nodes and it doesn't work unless i don't specify one and it uses the default "All media".
Is there anything in particular that could be causing this?
Thank you for your help :)
Kind Regards,
Gary Henshall
Hi Gary,
I've just booted up a new build with the starter kit and installed ezSearch and it works out of the box.
Can you put this code
above (around line 115)
and then see what gets written out to the page. This should show you the lucene query that is being constructed. You can then test this query against the index directly in the back office. Navigate to Developer -> Examine Management -> Searchers and expand ExternalSearcher -> Search Tools. Toggle the Lucene Search radio button and paste in the query that is written out to your search page here.
If this isn't returning anything, I suggest it hasn't made it into your index, or the query is broken.
Paste your results here and we'll debug!!
Many thanks,
David
Hi David,
I have done as above. The results are as below:
Query returned when i don't specify a RootMediaNodeId: (Returns a MEDIA image called "High Rise")
Query returned when i specify a RootMediaNodeId (Doesn't return any search MEDIA results)
Pasting these two in the Developer Lucene External Searcher reflects what is shown on the front end of the website. Pointing towards indexer issues?
A note to add is that this current site is a copy of another site so i am not sure if that may have something to do with it?
Thanks again for the help :)
Kind Regards,
Gary Henshall
Hmm. Yes, looking that way.
Just to clarify 2519 is the Id of the folder node that contains the media image called "High Rise"?
From the Examine Management tab, can you open up the ExternalIndexer -> External Index & Tools and click rebuild index.
Is this a new site or a mature site? It could take a while to rebuild based on how many nodes you have to index, but I'm assuming you're working on a dev version at the moment. If not, you may want to choose a time to rebuild the index when less busy.
On the text search radio button of Examine Management Searchers, try putting in High Rise and see if it is in the index.
Many thanks, David
Correct, 2519 is the Media folder with content we want to be able to search. This folder contains the High Rise image which returns in the results if we DO NOT specify a rootMediaNodeId.
I am currently using a dev copy of the site. Using the Text Search also returns the images before and after rebuilding the indexes but still no luck on the front end.
I have also done a Text search for that specific folder and that appears with the correlating ID's.
Kind Regards,
Gary
Hi Gary,
I feel I'm running out of ideas on this one!
I can see that the search fields look slightly different to mine (OOTB)
The preview field is bodyText by default.
I don't know whether media uses metaTitle rather than the nodeName - that certainly wasn't my understanding but hey!
When you do your back office Examine Management query and it returns the media image "High Rise" in the index, could you copy that into the thread so I can see what fields are in the index please.
Many thanks, David
Hi David,
I am the same as you, it definitely exists within the index:
NodeName seems to exist. This is a weird one and i cannot figure out what is going wrong here. Both the folder and the child image exists in the index and the ID's in the index are the same as it is in the media section.
Not sure where to go from here. I have added a new "Searchable" folder and added a new child image. Rebuilt the index and this is visible on the Developer Index searchers. However, the new image is not being returned on the front end using the ezSearch with or without a rootMediaNodeId. Could there be a possibility that there is two indexes here? It feels like the ezsearch is using a different index to what Umbraco is.
Thanks for your help with debugging the issues.
Kind Regards,
Gary Henshall
Hi Gary,
Can you just check you have a file called Our.Umbraco.ezSearch.dll in your bin folder?
Basically my thinking is like this - Lucene struggles with hyphens/dashes (-) in fields unless using the right analyser (can't remember it off the top of my head) so nodeName might not return what you're expecting here. However, ezSearch adds an additional field "contents" to the index that I can't see on your output here. This is basically most of the fields space separated so it can search easier.
Many thanks, David
Hi David,
Unfortunately, the dll exists! I have searched to see if any other files are missing and the only thing i can see is the ezsearch config within the installedpackages.config file.
Would this have any affect? Apart from that i can't see any issue.
Kind Regards,
Gary Henshall
Hi Gary,
I've made some progress with my version, and get it to throw a similar error - it looks like ezSearch is still set to find the umbracoFile directly being set rather than checking if it is an ImageCropper (and therefore stored as json).
https://github.com/umco/umbraco-ezsearch/issues/7
I just tried changing the method in the App_Code folder in ezSearchBootstrapper.cs on line 49
Hi David,
Thank you, I just tried adding in the changes that you have mentioned but still no luck! I don't think this issue relates as this still wouldn't work when an ID isn't provided for the rootMediaNode?
Kind Regards,
Gary Henshall
Hello
Same issue here. Tried the solution provided but no luck. Any ideas please?
Thanks
Hello,
Apologies for the delay. I still haven't found the work around for this so please if you do find something please share. I had tried all steps discussed above but no luck :(
Kind Regards,
Gary Henshall
Hello
It is working now for me. There was a custom index in the Examine configs that was causing the issue.
Hope that helps.
Regards A
is working on a reply...