Developer forum

Forum » CMS - Standard features » index query not giving results from words in richtext field

index query not giving results from words in richtext field

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

 

I have configured an index that should search freetext. I am using the configuration field "contains" search-paramter to match the query parameter value to the richtext string field. The richtext is stored as string.

there are other input fields (not richtext) also stored as string. All fields are stored, indexed and analyzed.

I have configured the query to search in all fields, using "or" - so it should give a result, if the searchtext is present in any of the fields.

However, this gives no result if the searchtext is present in the richtext field (this typically has a much longer string). If the searchtext is present in other fields, i get the expected result.

Is there anything special i should do when trying to index, store and search richtext?

 

I have tried adding priority and using spell check, but I get the same result.

 

/Hans


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Hans,

 

There shouldn't be. Are you sure you are using a term that a word starts with? And can you share the setup of the freetext (summary) field and the Query expressions?

 

Please notice that for Lucene, a "Contains" is essentially a "Starts with". Although not recommended for performance reasons, you can try the "ContainsExtended" to see if you have any results.

 

Best Regards,

Nuno Aguiar

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Yes, it gives no result -  no matter what word i try.

Here are my fields https://www.screencast.com/t/U3YrFE2pf

This is the query https://www.screencast.com/t/C1oVDqvYI

 

This search

https://www.lum.fo/default.aspx?ID=667&fra=01.01.01.01.2001&til=31.12.31.12.2023&leita=mist%C3%B8k

should result in eg. this page:

https://www.lum.fo/alit-um-vi%c3%b0ger%c3%b0ina-hja-torshavnar-kommunu-og-umhvoervismalara%c3%b0num-av-broytingum-i-byggisamtyktini-fyri-velbasta%c3%b0

but it does not. It gives another result, that has the searcherm "mistøk" in a another (non-richtext) field.

 

/Hans

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Hans,

 

It's probably the Analyzer for the summary field. You can look into the Lucene index using LukeNet to see exactly what's indexed on that field, because if you try this search, it shows up

https://www.lum.fo/savn?fra=01.01.01.01.2001&til=31.12.31.12.2023&leita=mist

 

Also please check this thread that might help you https://doc.dynamicweb.com/forum/ecommerce-standard-features/ecommerce-standard-features/searching-for-products-with-special-characters-in-their-name

 

Best Regards,

Nuno Aguiar

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi Nuno

thanks again for your time. I am not quite sure what to do. Is there a way that I can make it work on a standard solution, or would that require custom coding?

/Hans

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Hans,

 

I'd have to look deeper into your case (download the index and use LukeNet to see what's in the index; compare the fields you say work vs the summary field; ...).

 

You can also use an expression group (using OR) instead of a summary field and that should give you basically the same outcome.

 

 

Best Regards,

Nuno Aguiar

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Thank you

I tried using the OR expression group before moving to the summary field, but that did not work either. Therefore I tried the summary field.

Does that indicate that there is another problem?

/Hans

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Hans,

 

Again, without looking deeper, it's hard to help. I highly recommend you download the index files and use LukeNet to see what and how things are getting indexed. I haven't came across an issue where the rich text editor contents are treated differently, but that does not mean it's not there.

 

BR

Nuno Aguiar

 

You must be logged in to post in the forum