Search Improvements

Search Improvements 2.15.8

No permission to download

Xon

Well-known member
Xon submitted a new resource:

Search Improvements - Minor search improvements

A collection of improvements to XF's Enhanced Search and some for XenForo's default MySQL search.

MySQL & Elastic Search features;
  • range_query search DSL
    • allows arbitrary range queries for numerical data
  • Allow users to select the default search order independent for the forum wide setting.
Elastic Search Only features:
  • Per content type weighting
  • Adds Elastic Search information to the AdminCP home screen.
  • Adds a debug option to log the...

Read more about this resource...
 
Can you explain what "content type weighting" is? I don't really understand.

For example if I put Posts = 5 and Thread = 3, if I search something, it will shows posts first, then threads?

What is the main purpose of this addon? to speed up searches?

" wraps a number of tokens to signify a phrase for searching
I did searches using quotes before and after I installed the product and didn't notice any difference in the results.
 
Can you explain what "content type weighting" is? I don't really understand.

For example if I put Posts = 5 and Thread = 3, if I search something, it will shows posts first, then threads?
Yes, it allows you to influence which content type (ie post/thread/conversation) tends to drift higher to the search results.

Using low values (ie <10) isn't going to influence the results that strongly, you'll need to experiment with it.

What is the main purpose of this addon? to speed up searches?
A collection of small tweaks to the search system, and a shared code-base for some of my other add-ons.

I did searches using quotes before and after I installed the product and didn't notice any difference in the results.
You need to enable the "enhanced search syntax" and be using XFES/ElasticSearch. It also depends on if you have word stemming turned on.
 
Hi @Xon
i try the latest version

and still have some error

Code:
{"sort":["_score",{"date":"desc"}],"docvalue_fields":["discussion_id","user","date"],"_source":false,"size":10000,"query":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["title","message"],"default_operator":"and"}},"must_not":[{"exists":{"field":"hidden"}},{"terms":{"node":[81,117]}}]}}}
 
@Xon nice, love your work :D

195866

Not sure if this is controlled by your addon but in XF 1.5 with enhanced search if i search for phrase = php 7.2 it would return matches for php 7.2.15 or php 7.2.14 etc references. But in XF 2.1.0 with enhanced search 2.1.0 and search improvements 2.2.0, searching php 7.2 returns empty while php 7.2* returns results for php 7.2.15 or 7.2.14 as well. I have set search option min word search = 2.

Strangely though, if i have post with word 6.6.0, searching 6.6 matches 6.6.0 ??
 
Last edited:
@eva2000 make sure you have 'Word stemming' enabled for XF2, I don't think it is enabled by default for XF2.

This add-on wouldn't change how the word-matching strategy is used.
 
@eva2000 make sure you have 'Word stemming' enabled for XF2, I don't think it is enabled by default for XF2.

This add-on wouldn't change how the word-matching strategy is used.
cheers word stemming is enabled but guess need to troubleshoot the issue.
 
Is there any way to restrict the Enhanced Search functionality to certain user groups, and have other user groups use the default search?
 
@Xon
Is it intentional that 0 and 1 are the only weighing values that can be used?
The weighting values are passed directly to ElasticSeach, you tend to need to use fairly large values to ensure a content type is preferred over another one.
 
The weighting values are passed directly to ElasticSeach, you tend to need to use fairly large values to ensure a content type is preferred over another one.
Thanks. I actually didn't realize it was an Elastic Search only option, so my bad.
 
Back
Top Bottom