Hi, having set up AjaxSearch I’ve noticed that by default when you do a search it brings up results where it matches the names of pages to your query- so if I search for "x" it brings up pages with "x" in their name.
What I’d like it to do is search through the text content of all the pages and come up with results on that basis, so if any page contains that search term, it gets included in the results. If the individual word or phrase results could also be highlighted somehow that would be even better.
Also, and this may be pushing it, I wonder if it can be set up to calculate "percentage relevance" for each page- for example if a particular page contains more instances of the search term than any others, it comes at the top of the search results, with the highest percentage relevance marked next to it.
Does anyone know if and how these things can be achieved?
-
☆ A M B ☆
- 24,524 Posts
AjaxSearch does search the content field.
Not on my installation I’m afraid. For example if I search on "travel", a word which I know comes up a lot on some pages, I get:
2 results found for "travel".
Travel Travel page
...Travel page ...
Travel Features Travel Features page
...Travel Features page ...
- and that’s it.
The code I’m using is:
[!AjaxSearch? &ajaxSearch=`0` &AS_landing=`70`&AS_showResults=`0`!]
-
☆ A M B ☆
- 24,524 Posts
All I can say is that it’s always worked just fine for all the sites I’ve used it on. Do you have a link for this site?
-
☆ A M B ☆
- 24,524 Posts
That is odd; I’ve never seen it do that before. Is this the AjaxSearch that was installed with MODx by default? What version of MODx and of AjaxSearch?
The AjaxSearch version is 1.8.3, I’m running the version 1.0.0 of modX...
Thanks
-
☆ A M B ☆
- 24,524 Posts
What does your AjaxSearch snippet on the landing page look like?
[!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0` &tplResults=`{{resultsholder}}` &tplResult=`{{resultholder}}` !]
The {{resultholder}} and {{resultholders}} chunks are just empty chunks to hold the results (suggested in another thread)
-
☆ A M B ☆
- 24,524 Posts
Hm. Still works fine for me (I installed a brand-new 1.0 just to test this out). Do you have any plugins besides the Search Highlighting one that might affect search results?