In other words, is the search string is found in the title of an article, I expect it to be displayed above the other results, (above the matches in the content).
This issue is separated from #11996
Activate the search content plugin and search a word that is found in one of the titles of an article.
If the word in the title matches, that should be displayed above the other results where the match is within the content. (this is generally what we are used to see from Google search results.)
Articles are ordered according to the article id but not according to the matching titles first and then the matching content.
Maybe SQL and Joomla gurus find a way to merge two search queries. The first searches in the titles, second searches in the content. The first query results are displayed first and then the second query results come.
I have also set up a fresh Joomla installation with test data (Teaching Joomla in English). After setting it up, I have searched the Word Joomla in the search box.
Here is the order of the search results:
Templates
Protostar
Plugins
Park Blog
Navigation Modules
Modules
Languages
Joomla!
Extensions
As you see the article with Joomla is not ranking 1st but 8th.
I am talking about "search content plugin" which is available on this test site by default.
Labels |
Added:
?
|
Category | ⇒ | com_search UI/UX |
This has come up before. The problem is with the sql query producing a single set of results and then sorting by a single field.
The only way you can achieve what you are asking for is to use Smart Search and not search. That was written specifically for this requirement
Status | New | ⇒ | Discussion |
i am a new person to open source project, Joomla and I like to work on this issue
@Shazrina1994, then please do! But as @brianteeman said it was solved with using Smart search instead of Search which creates an index of results.
yah @tonypartridge I got it and working on that Search
Thank you @Shazrina1994 . I prefer to use this search since smart search stores massive data in the database. Personally I still have no idea why smart search is not an addon but a core component. It creates many tables as well.
Because it is a heavily optimised search engine for Joomla! Rather than a heavy search component like what you are using. If you have thousands of articles and other content and are searching the whole database every time someone has a query it adds a ton of overhead to the system, opposed to a refined and optimised search system.
Many thanks
Tony
On 1 Aug 2017, 15:51 +0100, hakanara notifications@github.com, wrote:
Thank you @Shazrina1994 . I prefer to use this search since smart search stores massive data in the database. Personally I still have no idea why smart search is not an addon but a core component. It creates many tables as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
I prefer to use this search since smart search stores massive data in the database.
That's kind of how search platforms work though. They store an index of the data on your site in a specialized set of tables (or whatever the platform uses for storage) and query that when you issue a search.
com_search
plugins are really just a simple "query this table, see if these fields contain search term", they don't have the logic to be able to do weighted searches or order results in a way that would be most logical for the user.
@tonypartridge , @mbabker Thank you very much for the explanations. I understand that you are not very optimistic about brining the matching titles at the first position with the standard search plugin. Therefore, I will also try to see how the other component works though. Your explanations made me curious. Thank you very much for all the time you have spent on Joomla :-)
You are very welcome. Can we close this, given the answer is to use Smart Search
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-03 04:16:31 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2017-08-03 04:16:31 | ⇒ | 2017-08-03 04:16:32 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/17361
closed as stated above.
Interesting, off the top of my head the query is a single query if this or that. Not 1 then 2, since it's duplicated queries for a simple query. An interesting point though.