Hi Chris,
Chris Hostetter-3 wrote: > > I'm not entirely sure i undestand what you're asking, but have you looked > at ExternalFileField ? ... what you are describing sounds an awful lot > like using it in a FunctionQuery > Yes, it's really a lot. I am not sure whether an ExternalFileField-source would work faster than a SolrCache (a lot of the needed data is always the same, so it's okay to store it in an external file). However: is it really more performant to get the metadata from there? Did you make any experiences here? I *think* SolrJ is the right way to get stats and other things about my index directly from the server. I just need to query them and store them in a cache**. That's all. I can reuse them everytime. In fact I only need SolrJ to fill the cache, if it is empty (or a special event gets fired). > but you can declare any custom instances of a SolrCache that you > want in your solrconfig.xml (there is an example commented out in the > example solrconfig.xml -- look for "myUserCache") which you can then > access in any custom plugin you want using SolrIndexSearcher (getCache, > cacheInsert, cacheLookup, etc... any of hte cache methods that take a > cacheName) > Thank you *very* much. I didn't know how to access them, so I spent a few hours today to search for a solution. By the way - do I learn more about such special cases if I have a look at "Solr 1.4 Enterprise-Search-Server-Book" or "Lucene in Action"? It is really frustrating when you want to get things done but don't know where to start. I don't know which of these books to buy first and which of both fits such needs more. But thats off topic, of course. :) > I've implemented some custom metadata caches (for driving complex > faceting) like this, but i'm afraid i can't share the code examples. > Complex faceting is a really interesting topic. You talked about conditional faceting a few years ago. It's a really interesting topic and I hope I can spent some time on that in future. **before I am going to start writing the first lines of code, I need to know about how Solr uses function queries. Is there a new instance of the function query per request, per Solr-lifetime, per...what?? -- Grant Ingersoll-2 wrote: > > Have you looked at the File based ValueSource in Solr? It can be loaded > per commit and is designed to hold precomputed scores that are then > factored in via Function queries. > Yes, I did. Honestly, I didn't understand how to use this function query, because there was no example given (how should a file for that usecase looks like? When should which score applies?). My usecase will look like a conditional score: - getting the value x of a field - lookup in the cache (or map) for the value of map.get(x) - lookup in another cache for map.get(value) - computing a custom score-factor and returning it I hope this helps understanding my issue a little bit better. Thank you both! Kind regards - Mitch -- View this message in context: http://lucene.472066.n3.nabble.com/RequestHandler-function-Query-with-Cache-implementation-tp757610p760582.html Sent from the Solr - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
