Keyword

Extra fields in search results

  • Evert Bal
  • Evert Bal's Avatar Topic Author
  • Offline
  • New Member
More
15 years 7 months ago #74575 by Evert Bal
Extra fields in search results was created by Evert Bal
Does anyone knows a solution for showing the extra fields in the search results?

Please Log in or Create an account to join the conversation.

More
15 years 1 month ago #74576 by Viktoria Sab
Replied by Viktoria Sab on topic Extra fields in search results
Hi, I am interested too. PLZ, some references...

Please Log in or Create an account to join the conversation.

  • Evert Bal
  • Evert Bal's Avatar Topic Author
  • Offline
  • New Member
More
15 years 1 month ago #74577 by Evert Bal
Replied by Evert Bal on topic Extra fields in search results
Hey,

I didn't found a solution for K2. So I switched to mosets' Hot Property.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #74578 by Daniel Arnolf
Replied by Daniel Arnolf on topic Extra fields in search results
As far as I understand, you can't search through extra fields.
Something came up, check this module: labs.smartwebstudio.com/ , it does the job but it is a separated search module, just to search a single category, child categories, a chosen extra field etc, it even have other options like select box to filter by a determined item into a drop down extra field, which will avoid tags for filtering results.
You can use various instances of the module in same page to search and select by different criteria.
It outputs the filtered result through generic.php, which is a drawback since you can only override once, and affect the output of tags and author at the same time. I'm waiting for an answer from the developer to see if is possible to get the results assigned to a custom template override, and avoid changing the generic.php.
Another thing to notice, is that to get it to work, you may have to do a few slight changes to the K2 core files, the author provides the needed override, as well as the backup to restore the original core files.
Hope it helps.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #74579 by Simon Wells
Replied by Simon Wells on topic Extra fields in search results
Just a quick thought process, and I cant see why it could not be done and without a core hack.

Instead of using generic.php, it could be routed to use the item.php instead, but with these things, it would require a few hours coding to implement such a thing.
Not sure which search module your using, but the K2 search uses joomla search and that picks up K2 items and categories, so it should be possible to include a template over ride to allow search by extra field data, as its just a DB query, easy stuff ;)

I can recommend some "trusted" coders which I know can handle the k2 code, but it is worth noting that you would most likely have to cross some palms with silver.

If, there are several users that require this kind of function, then that would make it more viable.

Lets keep this open and see what we can come up with.

Regards,

Simon
K2 Support

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #74580 by Daniel Arnolf
Replied by Daniel Arnolf on topic Extra fields in search results
Hi Simon.

I will really appreciate if you can connect me to a Joomla - K2 coder to solve this issue.
Here is the some information on the module I'm using: labs.smartwebstudio.com/ , it does exactly what I need, it searches and filters extra fields contents.
Since I'm trying to create a kind of phonebook with about 13 extra fields, no content or images, I want to override the output to display a table, but I won't actually have an item.php view, just the category_item.php will do. The only thing stopping me is the fact that the module outputs through generic.php, if I can route it to print trough a custom template, I'm done.
I apologize to the members of the discussion if I get out of context with my comment, but I found no way to contact Simon directly.

Thank you very much.
Daniel Arnolf

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #74581 by Dragan Todorovic
Replied by Dragan Todorovic on topic Extra fields in search results
add this in generic.php

<?php

$custom = json_decode($item->extra_fields);

$first_xfield    =  $custom[0]->value[1];

?>

 

<?php echo $first_xfield ?>

 

to find all

 

do

 

print_r ( $custom);

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74582 by Jock
Replied by Jock on topic Extra fields in search results
I'm not sure if my problem is related or not but I have the following issue:

 

I want my search results to have the snippet of text with the highlighted keyword(s) for content that is in extra fields. Currently it is returning the matching item but not with any snippet text even though it is there.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74583 by BBC
Replied by BBC on topic Extra fields in search results
It is a template styling issue, not K2.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74584 by Jock
Replied by Jock on topic Extra fields in search results
Hi BBC,

 

Could you explain how I would resolve this? As far as I can tell K2 items are being returned in the search but with empty paragraph tags where the snippet should be.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74585 by Jock
Replied by Jock on topic Extra fields in search results
You say it is a template styling issue but I cant see any evidence of that. I believe it is either a query issue or a K2 extra fields issue.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74586 by BBC
Replied by BBC on topic Extra fields in search results
Give some URL of site with problem ?

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #74587 by Jock
Replied by Jock on topic Extra fields in search results
Hi BBC,

 

I've just realized that I am not actually using K2 search but Joomla Search module.

 

It's working fine and returning the K2 items but just not returning anything from the extra fields for the snippet.

 

Would you still like to see a URL?

 

Is there any fix for the Joomla core code that would resolve this?

 

Thanks

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74588 by BBC
Replied by BBC on topic Extra fields in search results
Give some URL. Don´t expect to much. I remember long ago when i changed templates at same site, this option dissapeared.

So it maybe because of template, maybe not.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74589 by BBC
Replied by BBC on topic Extra fields in search results
It is something different.

Check if your template use override for com_search. And try to rename that folder temporary.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74590 by BBC
Replied by BBC on topic Extra fields in search results
It is Beez template. It comes with com_search in. But it sholud be allways updated. It is Joomla folder.

How old is your Joomla version ?

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74591 by Jock
Replied by Jock on topic Extra fields in search results
com_search is present when I go to templates>beez>html>com_search

 

Joomla version is 1.5.23

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74592 by BBC
Replied by BBC on topic Extra fields in search results
I just got same results as you. But i got at least some text in search results. For all K2 Items.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74593 by Jock
Replied by Jock on topic Extra fields in search results
Are you talking about my site? All you get is the item name and the section ... no snippet. Do a search for "ruskin" and you will see what I mean.

 

Or am I not understanding you correctly?

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #74594 by BBC
Replied by BBC on topic Extra fields in search results
At my site. I have text in all search results. But not the words from extra fileds.

Maybe it is not possible yet in K2. That commercial search module use some plugin for indexing of extra fields.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum