- Posts: 87
COMMUNITY FORUM
Search Two or More Words
- Michael Yaeger
-
Topic Author
- Offline
- Premium Member
Less
More
9 years 9 months ago #145825
by Michael Yaeger
Search Two or More Words was created by Michael Yaeger
I am trying to type two or more words in the K2 Tools search box. However, I always get "No Results." However, if I search for a single word, it works fine. I see there was a
bug report
last year, but it was supposedly fixed. However, I am still seeing this issue.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 9 months ago #145894
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Search Two or More Words
Hello Michael,
Please apply this patch github.com/joomlaworks/k2/commit/03a1d2385118c2359c322e0a55db8703e66f5d55
Please apply this patch github.com/joomlaworks/k2/commit/03a1d2385118c2359c322e0a55db8703e66f5d55
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Michael Yaeger
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 87
9 years 9 months ago #145930
by Michael Yaeger
Replied by Michael Yaeger on topic Search Two or More Words
This did help a little, but did not solve the problem completely. I can search for two or more words in the description of an item, now. However, I can't search for two words in a category name.
Example:
If I search for "category two," the item does not show, only "No Results."
Example:
- Item = Item Number One
- Category = Category Number Two
If I search for "category two," the item does not show, only "No Results."
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 9 months ago - 9 years 9 months ago #145957
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Search Two or More Words
The search plugin searches within K2 items only.
It does not search for categories. If you want to add more advanced features eg: like searching categories, tag listings and extrafields you can use the Google Search functionality.
You can set this up in K2's settings.
It does not search for categories. If you want to add more advanced features eg: like searching categories, tag listings and extrafields you can use the Google Search functionality.
You can set this up in K2's settings.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 9 years 9 months ago by Krikor Boghossian.
Please Log in or Create an account to join the conversation.
- Michael Yaeger
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 87
9 years 9 months ago #146003
by Michael Yaeger
Replied by Michael Yaeger on topic Search Two or More Words
Enabling "Google Search integration" in K2's Advanced Parameters breaks search altogether. I get only an search box on the search results page with the search term in it:
imgur.com/EwrlBYt
Searching for anything yields no results.
imgur.com/EwrlBYt
Searching for anything yields no results.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 9 months ago #146037
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Search Two or More Words
Did you double check its settings? Is the container class present in your template?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Michael Yaeger
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 87
9 years 8 months ago - 9 years 8 months ago #146365
by Michael Yaeger
I changed the container ID settings from "k2GoogleSearchContainer" to "k2Container" and the search results displayed. However, the Google search layout is horrendous (granted I haven't customized a template for Google search, yet), and even though I get results for 2+ word searches, the results displayed are all over the place. It returns tag pages, item pages, category pages, etc.--it's a jumbled up mess.
More testing yielded that if I search for any number of words that are in the item text or extra fields, I get good results. However, if I search for 2+ words in a category name, I get zero results. But, if I search for 1 word in a category name, I get good results.
I believe there is still an issue with the K2 search function. However, from my findings, I believe I can create a (hidden) extra field to store the category for each item and then I should be able to get good results for 2+ word searches. I'll be testing this out in the next few days.
Replied by Michael Yaeger on topic Search Two or More Words
Krikor wrote: Did you double check its settings? Is the container class present in your template?
I changed the container ID settings from "k2GoogleSearchContainer" to "k2Container" and the search results displayed. However, the Google search layout is horrendous (granted I haven't customized a template for Google search, yet), and even though I get results for 2+ word searches, the results displayed are all over the place. It returns tag pages, item pages, category pages, etc.--it's a jumbled up mess.
More testing yielded that if I search for any number of words that are in the item text or extra fields, I get good results. However, if I search for 2+ words in a category name, I get zero results. But, if I search for 1 word in a category name, I get good results.
I believe there is still an issue with the K2 search function. However, from my findings, I believe I can create a (hidden) extra field to store the category for each item and then I should be able to get good results for 2+ word searches. I'll be testing this out in the next few days.
Last edit: 9 years 8 months ago by Michael Yaeger.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 8 months ago #146452
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Search Two or More Words
Let me know on your findings.
The Google layout can be changed but you will need a lot of !important overrides (these values where not put there by us).
The Google layout can be changed but you will need a lot of !important overrides (these values where not put there by us).
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Michael Yaeger
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 87
9 years 8 months ago #146735
by Michael Yaeger
Replied by Michael Yaeger on topic Search Two or More Words
Using a hidden extra field which carries the category name has resolved all issues. I'm using the standard K2 search, now. However, I would highly suggest including the category in searches to alleviate this issue. I could see where some might not want this, so have a Yes/No option for "Include category in search" in the K2 options sounds appropriate!
Please Log in or Create an account to join the conversation.