Closed (duplicate)
Project:
Search API Solr
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Reporter:
Created:
5 Apr 2011 at 14:22 UTC
Updated:
6 Jan 2013 at 23:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drunken monkeyNo, I haven't given this any thought, as I was completely unaware of this until now. Guess I should keep more in touch with developments in the software I'm integrating with … Thanks for bringing it to my attention!
Therefore, no, I don't know whether this module is compatible. From a quick glance at the release notes, I even suspect that it isn't, as seemingly the
HTMLStripWhitespaceTokenizerFactory, which is used in the schema.xml, was removed.You can definitely expect that to be fixed, though, the newest Solr release should of course be supported.
Regarding using new features I'm more hesitant, though. First off, we probably shouldn't just change requirements now and expect a newer Solr version. And also, I don't really see any major source for possible improvements. As the Search API doesn't support custom location fields, there also doesn't seem a way to take advantage of the new spatial searches. And while range facets for numbers do look interesting, there isn't even a real plan to implement them for dates.
Comment #2
Shadlington commentedOkay, that makes sense.
Completely agree that the requirement shouldn't switch to 3.1 - plenty of people will be on 1.41 for a long time to come.
I already knew that Search API didn't support location fields but not knowing the architecture I am curious if the possibility exists that this could be implemented in the future (either as a feature of the core module or in contrib) or if its pretty much not possible as it stands.
Comment #3
drunken monkeyI think it would be pretty hard to support custom types in a generic way. However, supporting this with a contrib module, or with custom modules on specific sites, should be no problem, I think. I don't intend to implement such a module myself, though.
Comment #4
drunken monkeyComment #5
jsenich commentedSubscribing.
Comment #6
drunken monkeyAh, sorry, forgot about this.
The attached patch works with Solr 1.4 – does it also work with 3.1?
Comment #7
Shadlington commentedI'll test this out at the weekend, if no-one else has already done so.
On a vaguely-related note, there are the beginnings of plans to make the geofield module compatible with Search API.
Gagarine has expressed an interest in doing this.
See #1117464: Search API integration, as well as the first step of making geofield support Entity API, #1153480: geofield_field_info should set a property_type
I'm really just posting this in case you're interested and have the time to comment.
I really wish I could be of use myself, but I just don't know enough yet.
Comment #8
gagarine commented#6 works for for me on solr 3.1 but with some warnings.
If we specified luceneMatchVersion to at least the version 3 we remove a lot of warning.
One is about solrconfig, org.apache.solr.request.XSLTResponseWriter is remplaced by org.apache.solr.response.XSLTResponseWriter.
We should also specified a queryConverter.
I don't know if we those change can be make without breaking old version.
Comment #9
drunken monkeyThanks for reviewing!
Just post a patch (or the altered file(s)) here and I'll see if they have negative effects on Solr 3.0. (If there are still warnings you couldn't get away, I can also try to address those.)
Comment #10
Fidelix commentedSubscribing...
Comment #11
Anonymous (not verified) commentedI used the patch from #6 on the latest Search Api Solr devx, with Tomcat 7.x latest and Apache Solr 3.2.0
Just wanted to say, it works. Thanks!
Comment #12
drunken monkeyBut I guess there are still some warnings when starting Solr? Could you maybe try to fix those and then post an updated patch here? It seems gagarine isn't interested in this issue anymore …
Comment #13
Anonymous (not verified) commentedHi, it works without issues for me, with default installations tomcat 7.x and apache solr 3.2.0.
I looked at the tomcat7.stderror logs, and did a restart, then I only saw som INFO message, nothing spectactular like #8. I dont have the errors gagarin posted.
Comment #14
drunken monkeyAh, OK, good to know.
Maybe this only happens with 3.1 and 3.2 is more tolerant?
Well, anyways, it's better than nothing, so I just committed this. If there are warnings with 3.1, a) it's still better than before and b) people can re-open this issue.
Comment #16
jakonore commentedsub
Comment #17
gagarine commentedSorry I forget about this issue. I assigned the issue to myself, I should not forget about it again.
For a new project I use solr 3.3. It works great but I get some warnings (I filtered out line without warning).
I don't things is possible to make a config file than works for 1.4 and 3.x without using deprecated syntax and features. Of course we can add a luceneMatchVersion to hide warning but I will be more for creating another config for 3.0 than will also work for 4.0.
Comment #18
Anonymous (not verified) commented@#17 "You should at some point declare and reindex to at least 3.0,"
Seems like it asks you to re-index your data?
Comment #19
gagarine commentedIt asks to reindex the data without the LUCENE_24 emulation because this it's deprecated and going to be removed in feature release.
Comment #20
gagarine commentedA patch. I set the luceneMatchVersion to LUCENE_33. Perhaps it will be clever to set to a more compatible LUCENE_3.
With this new solrconfig I pass from a 20ms to 4ms latency and you get certainly lot of other improvement using LUCENE_33 instead of LUCENE_24.
Comment #21
gagarine commentedThis will works for all version
But as the log say: "WARNING: You should not use LUCENE_CURRENT as luceneMatchVersion property: if you use this setting, and then Solr upgrades to a newer release of Lucene, sizable changes may happen. If precise back compatibility is important then you should instead explicitly specify an actual Lucene version."
Comment #22
Anonymous (not verified) commentedOk, I didn't have this warning (#17) when i upgraded to Solr 3.3. Just worked right away, without a LUCENE_X directive.
Comment #23
gagarine commented@morningtime it works but you should have warnings (mixed with a hundred of other message on starting).
If you don't put luceneMatchVersion you are going to use the lucene 2.4 instead of 3.3. So it will works but you of course lose the benefit to be in 3.3. When you change luceneMatchVersion you have to reindex.
Comment #24
Anonymous (not verified) commentedOk, I believe you. But I find it so strange. If I downloaded Solr 3.3, then why does it do a 2.4 emulation? I thought Solr 1.4 was already Lucene 2.9.3 anyway, so why 2.4?
I downloaded Solr from here:
http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist//lucene/...
Comment #25
drunken monkeySince we want to add Geofield support in the near future, we'll probably have to add a separate Solr 3 schema.xml anyways. Would that solve the problems here, or at least most of them?
If so, could you please provide a schema.xml (and, if necessary, solrconfig.xml) that work without warnings with Solr 3, gagarine? I guess I'll just commit those, then (and update the INSTALL.txt accordingly, of course).
Comment #26
Anonymous (not verified) commentedOk now I'm on Solr 3.4 and I do see errors like #17.
And more things like that. Hopefully gagarin knows what to do ;)
Comment #27
gagarine commentedVoilà
Warning I use
But the INSTALL.txt should indicate than you have to replace by your actual version to avoid problems on solr update and reindex if you change this value.
No change on schema.xml is require.
Comment #28
dropbydrop commented+1
Comment #29
drunken monkeyAnd how can one find out what version is the „actual“ one which should be used?
Also, at least for me, this solrconfig.xml also works with Solr 1.4, without any warnings. Therefore it would seem we don't need to have two solrconfig.xml files after all. Can a few people please test and confirm this? With what versions does the solrconfig.xml in #27 work for you?
Comment #30
mollux commentedsub
Comment #31
berdirThe attached config file in #27 seems to work fine Solr 3.4.
I did however get this in the log file:
Nov 21, 2011 12:19:10 PM org.apache.solr.core.Config parseLuceneVersionString
WARNING: You should not use LUCENE_CURRENT as luceneMatchVersion property: if you use this setting, and then Solr upgrades to a newer release of Lucene, sizable changes may happen. If precise back compatibility is important then you should instead explicitly specify an actual Lucene version.
Nov 21, 2011 12:19:11 PM org.apache.solr.core.SolrConfig
INFO: Using Lucene MatchVersion: LUCENE_CURRENT
Comment #32
drunken monkeyYes, that warning is exactly what gagarine means with:
Good to hear this works for you too, though. I just need an answer for #29 and I guess we can commit this.
Comment #33
gagarine commentedI didn't find a doc for luceneMatchVersion :(. Some valid values are LUCENE_CURRENT, LUCENE_24 (this is the fallback if you don't provide a value, it's an emulation of 2.x and a lot slower), LUCENE_3, LUCENE_31, LUCENE_4 and perhaps other...
Copy past from http://lucene.472066.n3.nabble.com/Solr-1-4-1-compatible-with-Lucene-3-0...
Comment #34
gagarine commentedI think we can marque this as reviewed.
Comment #35
drunken monkeyNo, we really shouldn't commit this without at least a note in the INSTALL.txt about what to enter there. And maybe a similar note in the file itself – along with a link to some resource showing the appropriate values. Or „The release notes of your Solr version will contain the correct Lucene version to use.“
We should also update the version note in INSTALL.txt to reflect we now support Solr 3.x as well.
Comment #36
larowlanHere's the patch for the INSTALL.txt file.
The config at #28 is referenced as solrconfig.3.xml in the INSTALL.txt file.
Comment #37
Sylvain_G commentedDamn i'm using Solr 3.3 with Search API Solr search
Indexing sounds ok but seaching with solr admin console fails
I got this error @statup
ATTENTION: no default search field specified in schema.
So a simple search XXXX:8983/solr/select/?q=utinam&start=0&rows=10&indent=on&fl=*,score
Fails, while
XXXX:8983/solr/select/?q=utinam&start=0&rows=10&indent=on&fl=*,score&qf=t_body:value
Works
how can i tell solr to search in all node fields?
Comment #39
pyrello commented+1 for alternate configuration.
Comment #40
nick_vhNot that it is duplicate but this #1509380: Adopt common solrconfig.xml and schema.xml files for Apache Solr Search Integration and Search API Solr could help all of us. And it solves the 3.x and 1.4.x version problem.
Comment #41
nick_vhNot that it is duplicate but this #1509380: Adopt common solrconfig.xml and schema.xml files for Apache Solr Search Integration and Search API Solr could help all of us. And it solves the 3.x and 1.4.x version problem.
Comment #42
pwolanin commentedObviously changing the schema.xml and solrconfig.xml might require search_api users to re-index, but I agree with Nick here that we have invested a lot of time looking at the 7.x config files in apachesolr to improve them, and having them be common would be good for everyone.
Comment #43
pyrello commented+ for making the configs the same as apachesolr module. Being someone who runs a number of sites that use the apachesolr module currently, this would make it easier for me to try out search_api, since it would require that I set up a separate core.
Comment #44
stockliasteroid commentedI can confirm that #27 works for Solr 3.6. While I would love to see unified solr configs, it seems that in the meantime this module should at least provide some sort of out of the box solr 3.x support, because the Solr 1.x binaries have been removed from the Apache mirrors. So, getting this module up and running requires you to either use the patched config above or track down a copy of 1.4 somewhere. In my rough tests 3.6 seems way faster than 1.4, so it seems like a good deal all around to have intermediate support for 3.x while a unified config is worked out.
Just my 2c... Probably not even worth that ;)
Comment #45
osopolar#27 works for me too + documentation patch #36 is ok.
Comment #46
hypertext200<indexDefaults>and<mainIndex>are deprecated and we have to use<indexConfig>instead. Just a heads up.Comment #47
nick_vhBe careful, you want to keep your compatibility with Solr < 3.6. Deprecated (at least in the Solr world, they do a good job for backwards compatibility) does not mean it does not work anymore afaik.
Comment #48
drunken monkeyThe common configs are now done.
Could you please test the latest patch in #1509380: Adopt common solrconfig.xml and schema.xml files for Apache Solr Search Integration and Search API Solr if it works with both 1.4 and 3.5+?
Comment #49
andypostCurrent version is 3.6.1 warnings
Maybe better make a conf folder and provide a config files for each major version?
Comment #50
drunken monkeyThe other issue, #1509380: Adopt common solrconfig.xml and schema.xml files for Apache Solr Search Integration and Search API Solr has been committed.