I'm having issues integrating Apache Solr, Apache Solr Attachments, tika and Views. I have a View that is using Apache Solr index to return results. I need my exposed "Apache Solr: Search" filter to be able to filter by text extracted from attached PDF's by tika and placed into the Apache Solr index. The PDF text is being extracted and stored in the Apache Solr index, but it seems the "Apache Solr: Search" filter is unable to reach that text.

My team has done a lot of digging and noticed if we comment line 293 of Drupal_Apache_Solr_Service.php, Views is able to search/filter from text extracted PDF's that are attached to the nodes. However, commenting out this line breaks every other filter for the view (CCK fields, taxonomy, etc) which are all within the Apache Solr index as well. Line 293 is as follows:

$queryString = preg_replace('/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', $queryString);

I'm not sure what exactly this line is doing to the query string to prevent PDF's text from making through to the View. Any information on what this specific line is doing or help would be greatly appreciated.

Thanks.

Comments

davidcalhoun’s picture

I've found what seems to be a temporary fix to this problem. Rather than commenting out the 293 line that I stated above, commenting out the line discussed on the below post appears to work. It seems Apache Solr Views limits results to node entities. I would love to have support for Attachments with Apache Solr Views.

Both the keyword search and all other filters are working. The only issue I have left to resolve is the fact I'm getting some duplicate results. It seems one result from the file attachment and another result from the node that the file is attached to.

http://drupal.org/node/948112#comment-3808282

davidcalhoun’s picture

Category: support » feature
Priority: Major » Normal
Status: Active » Closed (works as designed)