Hi

I'm currently having a problem with an external index.
On site A a Solr index is used to be searched in site B

On site A there is a field "zaal_capaciteit" which is indexed in the Solr index, but on site B that field is not visible in the external index.
However, if I go to the external server Sarnia settings and take a look at the Solr properties tab, the field is listed there. It even says that the field is indexed and stored.

On site B, that field does not exist, is that the reason why I'm not seeing that field?

I'm using that field, and others, in a view which now has broken/missing handlers because of the missing fields. The field above is just an example to explain my issue.
These fields where gone after updating from Solr 3 to Solr 4 with a new index.

I've included screenshots from the external Sarnia server Solr properties page and the fields in it's index.

I'm using the following modules and versions:

  • search_api: 1.20
  • search_api_solr: 1.11
  • sarnia: 1.3

Any help is welcome with this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yerlix created an issue. See original summary.

jmdeleon’s picture

Priority: Critical » Normal

(Dropping the priority a bit here)

Will look at this a bit more, but generally, a field will only appear in the list of Sarnia fields if there is data in the corresponding index. You also mentioned moving from Solr 3 to Solr 4, so you might want to look at your indexes and configuration on the Solr side to see that the data is populated properly.

Also it is a bit confusing as to which of your screen shots corresponds to the specific server configuration.

I'll also note that these indexes appear to be of Drupal data ie. you are using Sarnia to read indexes to a Drupal site in a raw format. It appears that you are attempting to share data between two Drupal sites -- this isn't the most efficient use of Sarnia (though it certainly can be used) and there may be better ways for you to export and share the data between your two sites. Sarnia is better used when you have Solr indexes built from a source other than Drupal.

yerlix’s picture

Thanks for your fast feedback at first.
(priority might be a bit over the top, but it is critical for my client at the moment)

The Sarnia index is completely indexed on the other side.
You are correct that it is data from another drupal site. The use case is that the data on site A must be searchable on site B without having to re-enter the content on the second site. In reality around 20 sites need to use the external index from site A.

All the screenshots are from site B, showing the Sarnia server fields in the Solr properties tab and the fields in the actual index (created by the Sarnia entity).

I can imagine that there are now better ways to search data from site A on site B, but this is the way it was setup years ago and the client wants it back in this way.
If you have an idea for this, I'm open to suggestion to make this better in the future.

For now, I need to have the fields from site A in the Sarnia index in site B.
To be clear, the index on site A is populated with around 2000 items, the Sarnia server on site B shows the fields on the Sarnia entity in the Solr properties tab and the corresponding index for that server doesn't show those fields.

If you need some other info, please ask. I'm not that experienced with Solr nor Sarnia.

jmdeleon’s picture

Component: User interface » Documentation
Status: Active » Closed (works as designed)

Took me a bit to decipher your screen-shots (especially trying to do that early in the morning answering email at 5:30 AM US Eastern time)...

You sent three screen-shots, but shots of two screens:

- Shots 1 and 2 are of the Search API Fields on the Sarnia Index (/admin/config/search/search_api/index/{index_name}/fields)

- Shot 3 is of the Sarnia entity fields in the Sarnia Solr server configuration (/admin/config/search/search_api/server/{server_name}/sarnia/schema). You also didn't send me a complete shot of this screen, showing all the entity fields.

It appears that your field "zaal_capaciteit" is an integer field, which shows up as a field in the list of Sarnia entity properties (server fields, Shot 3). This is expected: if there is data existing in the Solr index on that field, the field will show up in this list.

However an integer field will not show up in the list of fields in the Search API Index (Shots 1 and 2). The only fields that are displayed in this list are fields that can be full-text searched in Search API. Look at the column "Uses" in your Shot 3: the only fields that appear from Shot 3, in Shots 1 and 2 are those fields that have the value "fulltext" in the "Uses" column.

Fields that can be used as "fulltext" are basically of Solr type solr.TextField, or Date fields of Solr type solr.TrieDateField. Basically that includes any field in a Drupal index named with the prefix tm_ or ts_ . This is how Sarnia is designed.

You can then leverage Drupal Search API's full-text search capabilities on a Solr index by choosing fields of the proper type.

The full text search fields are also available in Views directly as fields to display. How those fields actually display is undefined, and dependent on the data the fields contain. You can display any of the other properties on an index (from Shot 3) using a View on a Sarnia index and the "Data" field on a Views display.

I hope this helps some...

yerlix’s picture

@jmdeleon thanks for your explanation in this matter.
Using the "Data" field fixes my broken/missing fields.

However the view doesn't show any results. The external Solr index is fully indexed so I assume I must see something.
I've tried clearing my view from any filters (normal filter criteria and contextual filters) but still nothing is displayed.
Is there a way to check that the external Solr index can be reached?

jmdeleon’s picture

Hey @yerlix

You might want to check the following areas under your Sarnia server configuration:

/admin/config/search/search_api/server/{sarnia_server}/sarnia/properties

Under Solr properties: check that the field has "display" in its "Uses" column

/admin/config/search/search_api/server/{sarnia_server}/sarnia/schema

Under Solr Schema: You might want to check that the integer fields in your index are not being prevented from displaying by Search API's Solr schema support... This may be similar to a problem I saw working with Solr 4.x indexes previously (but with date fields), and you may have to remove, add or change some rules present in these settings.

yerlix’s picture

FileSize
320.02 KB
382.07 KB
396.71 KB
233.17 KB

Hi @jmdeleon

Thanks for helping me out this much and apologies to not coming back sooner.

I've been using a field that had "display" in it's "Uses" column on the Sarnia properties page.

On it's Schema page however can't seem to figure out the rules.
I've included screenshots (of the whole list this time) of "admin/config/search/search_api/server/{sarnia_server}/sarnia/schema/display" see screenshots "schema part 1" to part 4.

I've disabled these rules, but still nothing is shown inside the view.