Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Did you know that
Elxis 5.x
uses HTML5, CSS3 and pure javascript without external libraries such as jQuery?
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Possible to change search engine so it doesn't search for exact phrase?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Possible to change search engine so it doesn't search for exact phrase? (Read 4748 times)
seadhna
Hero Member
Posts: 507
Possible to change search engine so it doesn't search for exact phrase?
«
on:
July 21, 2021, 18:46:13 »
Hi, I've just been searching forum about this idea and found this post from 2014:
https://forum.elxis.org/index.php?topic=7896.msg52069#msg52069
but I couldn't find a response on it.
Is it possible to tweak the frontend search so that if you enter multiple words it is not treated as an exact phrase unless they are in quotes?
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Possible to change search engine so it doesn't search for exact phrase?
«
Reply #1 on:
July 21, 2021, 19:33:06 »
Elxis supports multiple
search engines
and you can develop your own ones too. A search engine is a type of
Elxis extension
and each one can work totally different from the others. So
you can built your own search engine
and make it work as you want (search anywhere, any style). Lately I developed a custom one, alternative to the standard "content" engine, for site
e-nomothesia.gr
(in Greek sorry). The form at the top is a module, the actual form of the search engine is the one below. The form fields can be different, the database tables/files/remote systems to search different, the style of the results shown can be different, etc. You can customize anything.
So, to answer your question: Elxis has built-in a "content" search engine
for general use
. You can develop your own search engine and customize it as you want. And
Yes
, you can do what you ask.
«
Last Edit: July 21, 2021, 19:37:42 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
seadhna
Hero Member
Posts: 507
Re: Possible to change search engine so it doesn't search for exact phrase?
«
Reply #2 on:
July 23, 2021, 17:42:07 »
Thanks datahell, I'm trying to research how to do this - what's the term for when you don't want an exact phrase, but rather just for all the words to appear anywhere on the page?
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Possible to change search engine so it doesn't search for exact phrase?
«
Reply #3 on:
July 23, 2021, 21:54:32 »
I don't know the term however I don't find it a good option. For instance if I type as search term the phrase "
the cat is hungry
" the search will return results matching any of the words "the", "cat" "is" and "hungry". Do you see how many irrelevant results you will get? I believe there must be a kind of filter, for instance exclude common words like "the", "is", "in", etc, exclude small words (eg less than 4 characters), etc. An the other hand some of the excluded words might be important for some terms, for instance "
in charge
". You also need a very special ordering system, for instance place first the results with exact match and order the rest by the number of words matched and their occurrence. The search becomes too complex. I believe this kind of search can be realized only for specific sites and you need a very special indexing in database (a new db table I believe). The search will be performed on the indexing table instead like big search engines do (google for example).
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
seadhna
Hero Member
Posts: 507
Re: Possible to change search engine so it doesn't search for exact phrase?
«
Reply #4 on:
July 28, 2021, 14:33:19 »
Oh, so you don't think it's possible? Yes, I understand your point about small words (although I think it would be useful to search three-letter acronyms which many organisations use) e.g. FAO (Food and Agriculture Organization), which is currently not possible. An example of when it would be very useful to search for articles which must contain both words but the words don't have to appear together: there are many articles on a site regarding the airplane crash MH17 but many of the articles are regarding Malaysia and many are regarding Ukraine - to only see the articles which refer to Ukraine, it would be useful to be able to search MH17 ukraine but of course not as an exact phrase.
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Possible to change search engine so it doesn't search for exact phrase?