Minimal changes for apachesolr to make apachesolr_media work :)
The lib paths are the same as Solr example and needs to change for multi core solr deployment (maybe also for tomcat deployment).
http://wiki.apache.org/solr/ExtractingRequestHandler

Comments

nick_vh’s picture

Status: Active » Needs work

Please upload a valid patch file?

>   <lib dir="../../contrib/clustering/lib/" />
>   <lib dir="/total/crap/dir/ignored" />

Total crap?
I can't make any sense from this patch file :-)

shenzhuxi’s picture

I copy the lines from Solr example and didn't realize the crap. Just delete them.

nick_vh’s picture

Well, please hand us a patch in the correct format. That would be useful for everyone

shenzhuxi’s picture

Please check this one.
I forget to mention that I also add codes in Drupal_Apache_Solr_Service.php

nick_vh’s picture

I'm not so sure if we'd want to enable this for everyone. The apachesolr service class is extendable so it would/could be very easy to take that class and extend it to your likings and use the modified class in your custom module.

Regarding the solrconfig/schema it might be better to maintain one extra in your own module but I will discuss this with the other maintainers!

shenzhuxi’s picture

If extending apachesolr service class is the way to use Sole flexibly, the api in apachesolr module which is based on this class seems to be unnecessary.
I'm thinking a stack like this:

1. Solr (handle all the computing extensive tasks. Functions like load balance and distributed index shouldn't give to PHP)
2. PHP-Solr connector (I think it should be Independent from Drupal, and can be used and maintained for all php projects. http://www.solarium-project.org/ seems to be the most well design connector between php and solr (existing and active maintained but may be too big).)
3. apachesolr entity api (a module provides interface for connection and control Solr instances and doesn't provide any solrconfig/schema specific API and MAYBE deson't provide solrconfig/schema at all.))
4. node search, user search, file search (modules for all kinds of entities)

pwolanin’s picture

no, this is basically a "won't fix"

The config we fix is not supposed to be all-encompassing. Rather it's supposed to enable the features needed by the module.

The apachesolr_attachments module for example has a patch to enable the extracting handler I think. I general, if you are diving into these sort of features, you are capable of customizing your config.

shenzhuxi’s picture

Will file field in node not be indexable in Apachesolr forever?

nick_vh’s picture

Status: Needs work » Closed (won't fix)

Of course it will, but it should be maintained in a contrib module as pwolanin explains. Unfortunately there is no easy way of adding extra requesthandlers yet when we use solr's rest API but I hope this happens one day, so we can provide our schema from within the module and let contrib modules alter it!

shenzhuxi’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new548 bytes
<lib dir="../../contrib/extraction/lib" />
<lib dir="../../contrib/clustering/lib/" />

have been added to solrconfig.xml already.

Do you mind to add one more line?
<lib dir="../../dist/" />

It will make
<requestHandler name="/update/extract" startup="lazy" class="solr.extraction.ExtractingRequestHandler" >
working correctly.

pwolanin’s picture

Status: Needs review » Closed (won't fix)

No, I don't think that's correct. dist is not a library directory.

shenzhuxi’s picture

But apache-solr-cell was put under dist.
http://wiki.apache.org/solr/ExtractingRequestHandler