As mentioned in #1018470: Can't use display templates - no records being returned, I am now able to retrieve records from Solr (using a different syntax) but am still having problems displaying the content.

My first problem is that no matter what way I configure my display template elements at admin/xc/search/display_template_element, xc_search_display_template_element_get() fails to return anything as it's searching on entity_type = 'xc_oai_dc', whereas the ones I've created get an entity_type of just 'oai_dc'.

I temporarily changed the entity_type value in the database and got a bit further. My problem now is that xc_search_get_display_template_elements() still returns an empty array. I think it might be a two fold issue, but not very familiar with the create_function() php function so I might be wrong. So should the preg_replace() on line 1920 not use $xc_record rather than $xc (and is there a better approach to this)? And secondly, $xc_record doesn't contain an element, for example, 'dc:title'. The dc:title, and the other DC metadata, all seem to be lumped in as the body text and not as separate fields in the solr record. Should they be this way?

I've just realised that the schema.xml and solrconfig.xml from the apachesolr drupal module are the ones in use (multisite shared solr server) and not the ones provided with this module. Do you think that would make a difference or cause these problems?

Comments

stella’s picture

Title: Can't use display templates - can't access DC metadata » xc_solr not populating the Solr index with the harvested data

Ok, I think this is because no metadata is being returned. The site had both the apachesolr module (needed for other functionality) and xc_solr installed. The records that I thought were the ones indexed by xc_solr were actually indexed by apachesolr. I found this out by disabling the apachesolr module, deleting all records and re-harvesting my repository. When I do this, the records never end up in the Solr index.

I narrowed it down to line 1152 of xc_solr.module:

  if (count($_xc_solr_batch_documents) == 0
      || ($do_check_size && XC_BATCH_SIZE != 0
          && count($_xc_solr_batch_documents) != XC_BATCH_SIZE)) {
    return FALSE;
  }

The count of $_xc_solr_batch_documents is always zero :( I haven't figured out why yet, or how that variable gets populated, somewhere in xc_solr_xc_store() I'd imagine.

stella’s picture

I've tried debugging this further but just got lost in the code. Unless you can help point me in the right direction, I think I'll have to find another solution and not use the xc_solr module at all.

pkiraly’s picture

Assigned: Unassigned » pkiraly
pkiraly’s picture

Hi Stella, I made some changes here and there. I hope that it will solve your problems. An unwanted result of last great modification, that I were concentrating on XC schema records, and I add some XC schema specific conditions. Now I tried to remove these, and I tested some DC records. Now it works for me. If you could, please test it, and let me know the results.

stella’s picture

Hi,

I downloaded the latest dev version today and gave it a whirl. A couple of things were better, e.g. no longer need #1014786: XC Solr - no solr support when using authentication patch. However, my records still don't end up in Apache Solr. Before I was also using a merged version of the example xml files from the apachesolr module and this one. Now I have a (temporary) separate server which uses just the xc sample xml files, but still no joy.

pkiraly’s picture

Hi,

on the second page of schedule editing form you can choose what to do after harvesting: whether created nodes and index records into Solr. Please check your settings. I guess, the old settings may needs to revisit.

Péter

klmonnot’s picture

Version: » 6.x-1.1-beta4

I'm a new to this XC stuff. I have harvested data but the index's are not being populated. My data directory only has segments_1 and segments.gen in it. In the harvest scheduler I have repository=MST demo, set= marctoxctransformation, metadata format= xc, parsing=regular expression, harester cache=no, what to do after harvest= option d, mysql insert= sql insert. So I know that it suppose to harvest, create nodes and index, It does all except the indexing. I'll run the one-stop indexer and it runs like it's working but no index's are being solred index. I don't know the steps I should take. Do I have to run cron and when do I have to do that? I'm lost. Can you help me understand how this works? Maybe a step by step would help. Thanks

pkiraly’s picture

Hi Kathy,

It seems, that you did everything right. There are some documentation about harvesting like this one: http://drupal.org/node/1087084. You can check several things:
- if you click on the URL of the data provider at the harvest page, did you run into errors?
- have you got nodes created?
- have you got error messages in watchdog?
- have you got error messages in Solr log?

If you send me the URL of the data provider, I can check whether it works for me. You can also reach me in Skype, and we can share our screen to do a step-by-step checkings. Let me know what is best for you. You can write me a private message if you don't want to publish the data provider URL.

Péter

klmonnot’s picture

Thanks, I got the content to load into drupal. It created nodes and I got solr log running. What I had to do was use different schema and solronfig files. I used schema-for-3.3.0.xml and solrconfig-for-3.3.0.xml. So now it's all indexed.
Now I have all kinds of facets to look at, but when I try and use the pre made DVDs and Video, Databases, eJournals forms nothing shows up. Say I click on DVDs and Videos and put something in to search nothing shows up. also when I try clicking on the languages tab there are no languages listed but over on the in facets there are languages listed. Why can't these premade forms not see data?

Here's the url of the test database.
http://128.151.244.170:8080/MetadataServicesToolkit/pub/marctoxctransfor...

Also when I click on a facet I get data but I also get availability: loading... and call number: loading... It just hangs there! Does the Syndetics Solution Services settings supply this info?

I would love to setup something with you to go over our setups and explain how things work. Right now my boss is sick and I would like for him to be here too. So as soon as he is back I'll let you know. How can I get a hold of you thought email?