Closed (fixed)
Project:
Sarnia
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2012 at 16:14 UTC
Updated:
14 May 2012 at 19:30 UTC
Maybe the answer is obvious. I had assumed that since this is built on Search API and Search API Solr, facets would be part of the deal as well. After spending the past couple of days with this I finally have a view setup that will search my external Solr index but have hit a dead end with the facets. The only field available for me to facet on is the "id" which is the field that was selected as the entity type.
I don't see any way to add additional fields or facets when editing the Sarnia index.
Any advice?
Comments
Comment #1
becw commentedI'm not sure; the bulk of Sarnia was done before the Facet API module was available, so I haven't used the Facet API for anything. Sarnia overrides the fields available to Search API when it comes to searching, and since Search API does not write to Sarnia indexes, Search API's index field configuration isn't used to describe what is available in the Solr core.
So, this is an open question and needs more research.
Comment #2
cappadona commentedAh...that explains it...thanks for the explanation. It would be great if we could use facets with Sarnia indexes. I think I'm probably going to go back to ApacheSolr for my search needs but will probably use Sarnia when I want to list content due to the Views integration.
Thanks for the great module.
Comment #3
christowm commentedI ran into the same problem. Until the facet api implementation has been added, there is a work-around. In our case, we enabled the "old search facet" module. That allowed us to use the search facet type of capability. Of course, the old search facet module is deprecated, so I don't know for how long that feature will be available, but at least it works.
Comment #4
cappadona commentedSaw that old search facet sitting on the modules page but never bothered enabling it. I'll check it out...thanks for the heads up.
Comment #5
christowm commentedHi folks,
Since the deprecated search facets are working for Sarnia, I would venture to guess that the new implementation of the facet API should be able to accomodate Sarnia as well. So I would like to request that this feature be included in a future release of Sarnia.
Comment #6
becw commentedI've updated Sarnia to work with FacetAPI; this involved:
Let me know how it works for you.
Comment #7
egarias commentedTried the new dev version 2012-Apr-24 but no luck with facets.
I have a lot of fields indexed but in the facets tab i only see the id field.
What do I have to do??
Thanks for this GREAAAAAAT Module!
Comment #8
becw commented@egarias Do you have the search_api_facetapi module enabled?
Comment #9
egarias commentedI'm Sorry, Search Facet was not enabled,
I have now facets but for the properties with schema
The properties that are
are not available as facets.
is this normal?
I would have facets for those properties, would it be possible?
I also have this error
in admin/config/search/search_api/index/sarnia_solr/facets
Comment #10
becw commentedAh, interesting. I only made the "display" solr properties available, which is why you're seeing only "indexed, stored" properties. The issue with using tokenized properties as facets is that the tokens are used as facet values. For example, if you had a property where the original value was "South America", and the property has some sort of text tokenization, you would see two facets for it: "south" and "america".
The correct behavior would be that any property that is indexed, stored, and NOT tokenized should be available as a facet, like this:
faceted:
not faceted:
I'll look into that warning you're seeing. Thank you so much for the feedback!
Comment #11
egarias commentedThanks!
I want to ask a favor, Do you know whether i can modify the schema of my solr modifying the tokenized to not tokeninzed without loosing data?
I think this is an excelent module. I do have Drupal installations that i fill from external data then I don't need the whole drupal node for this content. I had made a specific xmlsitemap module for that content, is a content stored in solr but displayed in drupal, like any other content, this lets me have a lightweight drupal and a large data site capable.
Thanks again
Comment #12
becw commented@egarias If you change a field in your Solr schema from tokenized to not tokenized, it will change the way Solr searches on that field. In a tokenized field, "south" will find "South America". In a field that is not tokenized, only an exact match will find values--so only "South America" would find "South America". This really only matters if you're using an exposed Views filter on that field.
It's possible that you'll need to re-index your data if you change the schema for a particular field.