Re: Does Solr support integration with the Compass framework?
Hi Marios, It can store the index in a database, but I wouldn't want to use that route myself. Here is a quick link to the docs which provides an over-view of the transactional features; http://www.opensymphony.com/compass/versions/1.1M3/html/core-searchengine.html#core-searchengine-transaction HTH, Graham Marios Skounakis wrote: Does compass store the lucene index in a database? If this is the case, it is fairly straightforward to understand how this happens. If the index is still in disk files how does it provide transactional semantics? Would you care to give a high-level overview? TIA Marios On 1/15/07, Graham O'Regan [EMAIL PROTECTED] wrote: compass provides a transaction manager for lucene indexes so you can incorporate an index update and database update in a single transaction or roll-back if either fails. thats why it would be interesting to see the two working together. Marios Skounakis wrote: Hi all, I am working on a hibernate-solr bridge that will behave like the compass Hibernate3GpsDevice. It gets a callback from hibernate when an object is stored, checks if it is 'SolrDocumentable' and sends it to solr using the client library from: http://issues.apache.org/jira/browse/SOLR-20 (solr-client.zip) If your interested, i can send you my initial version... when i'm further along, i'll try to post it to solr/client/java That would be great - we're also facing the same issue of rolling our own code to keep a Solr index in sync with a MySQL DB that we access via Hibernate. I wonder whether people who try to keep a Solr (or Lucene) index in sync with a database are at all worried about index update failures. Propagating the update from the DB to the index is one thing, and relatively easy to implement. But how do you handle failures to update either the index or the DB since you cannot enforce transactional semantics over both updates? Or do index update failures occur so infrequently that you do not worry about it? Marios
Re: Does Solr support integration with the Compass framework?
doesn't compass use multiple indexes? have a read of the direct lucene box on http://www.opensymphony.com/compass/versions/1.1M3/html/introduction.html#i-use-lucene would that prevent the two being used together? i'd be interested in getting the two working together as well, it'd be great to have the compass api to create the indexes and use solr to expose them over http. Yonik Seeley wrote: One could do a very loose coupling by just pointing Solr at the index created by Compass, and send a commit command to solr whenever you want a new view of the index. -Yonik On 1/10/07, Jochen Franke [EMAIL PROTECTED] wrote: Currently I'm investigating different Lucene based search technologies. For the indexing of our object model my favorite is Compass because of the Object/Search Engine Mapping capabilities. At the same time Solr offers serveral nice features like faceted search and caching. Has anybody integrated or tried to integrate Solr with Compass already and can share experiences. Thanks, Jochen
Re: Does Solr support integration with the Compass framework?
doesn't compass use multiple indexes? have a read of the direct lucene box on http://www.opensymphony.com/compass/versions/1.1M3/html/introduction.html#i-use-lucene would that prevent the two being used together? i'd be interested in getting the two working together as well, it'd be great to have the compass api to create the indexes and use solr to expose them over http. Yonik Seeley wrote: One could do a very loose coupling by just pointing Solr at the index created by Compass, and send a commit command to solr whenever you want a new view of the index. -Yonik On 1/10/07, Jochen Franke [EMAIL PROTECTED] wrote: Currently I'm investigating different Lucene based search technologies. For the indexing of our object model my favorite is Compass because of the Object/Search Engine Mapping capabilities. At the same time Solr offers serveral nice features like faceted search and caching. Has anybody integrated or tried to integrate Solr with Compass already and can share experiences. Thanks, Jochen
Re: Indexing XML files
couldn't you use a cdata section? Chris Hostetter wrote: Since XML is the transport for sending data to Solr, you need to make sure all field values are XML escaped. If you wanted to index a plain text title and that tile contained an ampersand character Sense Sensability ...you would need to XML escape that as... Sense amp; Sensability ...Solr internally will treat that consistently as the JAva string Sense Sensability and when it comes time to return that string back to your query clients, will output it in whatever form is appropraite for your ResponseWriter -- if that's XML, then it will be XML escaped again, if it's JSON or something ike it, it can probably be left alone. The same holds tru for any other characters you wna to include in your field values: Solr doens't care that they *value* itself is an XML string, just that you properly escape the value in your XML adddoc message to Solr... add doc field name=titleAs You Like it/field field name=authorShakespeare, William/field field name=recordlt;myxmlgt;here goes the xml...lt;/myxmlgt;/field /doc /add ...does that make sense? : Ideally, I would like to store the xml as is, and index only the content : removing the xml-tags (I believe there is HTMLStripWhitespaceAnalyzer for : that). : And output the result as an xml (so, simple escaping does not work for me). the escaping is just to send the data to Solr -- once sent, Solr will process the unescaped string when deailing with analyzers, etc exactly as you'd expect. -Hoss