Did you guys ever though about giving people the ability to alter the configuration before you let them download it? I see there is a template-like schema.xml etc. in the resources folder, but iam not sure someone can override it (and this would not be the answer for everthing).

My ideas would be something like this. After replacing all tokens and finalizing the xml file ( each ). use a domdocument to read the doc, passt the doc to an alter hook. No we could use xpath to modify it.

E.g. i would like to add edge ngrams with my settings, i would like to add some new fields to the schema xml and things like that. I think the implementation would be very easy, just let me know if you are supporting this or not. I could work on this.

Comments

mkalkbrenner’s picture

I already thought about something similar. So patches are welcome. Maybe Apche Solr Multilingual's schema generator should simply provide some hooks for additional modules.

Nevertheless here's my approach:

You can already add new fields to the index using dynamic fields. So what we really need are additional field types (e.g. your edge ngrams). What about a hook to define a new field type. this is the informtion the schema generator needs:
1. a (multilingual) template file for the field type
2. the static or dynamic (multilingual) fields of this type to add to the index

EugenMayer’s picture

Well we need a hook for:
- field types
- fields
- copy fields

I expect 90% of all cases this would be enaugh modifications.
Everthing beyond that should be handled by the dom appraoch.

So actually i find your hook_field_type, hook_field, hook_copy_field a very valueable addition. But i would also add that "XML" modification approach just to be sure we cover all needs, also of the "high profile users with special tuning needs".

I had very good results using your configuration today, thank you a lot for the great work. I have some suggestion also, but i will open new requests for that.

mkalkbrenner’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev

Using the new querypath approach, it makes sense to provide alter hooks with an xml or querypath object as argument.

mkalkbrenner’s picture

see https://drupal.org/project/apachesolr_confgen

introduced hook_apachesolr_confgen_schema_alter() and hook_apachesolr_confgen_solrconfig_alter()

mkalkbrenner’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 5d16093 on 7.x-1.x, 6.x-3.x by mkalkbrenner:
    [#931950] mkalkbrenner: moved gerneric part of config file generation in...