Span Queries in SOLR - lucene

How does one issue span queries in SOLR (Span, SpanNear, etc)? I've
done a bit of research and I can't tell of a straightforward way to do it.
It would seem that I need to implement a QueryParserPlugin to accomplish
what I want to do. Is this the correct path? Surely this has been done before. Does
anybody have links to examples? I had trouble finding anything.

Span queries aren't currently supported (JIRA issue here).
Judging by this mail thread, it seems that you're on the correct path by implementing a QueryParserPlugin.
If you do implement this, consider submitting a patch!

Related

Best practice Sitecore Placeholder in rendering, share content

Im sure this has been asked before, but as far as I can see no one seems to mention the best practice for this case.
I have a body-placeholder that basically wraps everything of my page.. with in this placeholder the user is allowed to add "Section Renderings" each section rendering contains two additional Placeholders...
When adding two or more Section rendering however.. they seem to share the content that gets added in their two placeholders... and I guess this is since the placeholders are all sharing the same name..
Whats the best practice for this?.. I have read about people creating extensions of Html.Sitecore() and adding a what they refer to as a "Dynamic Placeholder"..
But well my question remains :).. whats the best practice for solving this issue?
#jammykam is correct. Sitecore does not support dynamic placeholders out of the box and you will need to implement an extension built by a third-party, or build your own version that meets your needs.
Personally, having had to dig into this a little in the past, I do not recommend starting from scratch and trying to figure it out. The available resources from other folks who have done the hard work will get you much further.

Does anyone know a better alternative to Google Translate API?

I already did similar search terms for this topic in this forum.
https://stackoverflow.com/questions/6151668/alternative-to-google-translate-api
But that post is a bit old.. Things may have changed for about a year. And I wonder does anybody know if there's any better REST-based API service that I can use out there since that post was last posted.
Thanks.
I guess Bing translator could be the substitute that u are looking for.
I was looking for alternatives as well and came across a npm package called google-translate-api-browser which does work for my small project, but I can't assure big data translations or requests not being throttled

Has anybody used AspectMap?

I have just stumbled accross the following AOP framework built on top of StructureMap and was wondering if anybody has any experience using it.
Any good, any issues?
http://www.chrissurfleet.co.uk/post/2012/06/27/AspectMap-Part-5-Aspect-Nesting-and-Prioritising.aspx
Or can you suggest any alternatives?
I use it, and like it, but then I built it! Its nice and easy to get started with, but isn't as full featured as some of the alternatives.
The nice thing is though that the code you write is generally reusable - so if you decide you want to use something else it will be easy to swap the aop provider out. Or you can easily start with something else and move onto AspectMap ;)
If you've got any questions feel free to mail me via the blog, or just ask on here

Does anyone have a SlickGrid wrapper for Haxe?

I am using the Haxe multi-platform programming tool (http://haxe.org) which, among other things, can generate JavaScript output. I would like to know if anyone has already done a "wrapper" library to interface Haxe with SlickGrid.
Doesn't look like one exists yet... sorry!
Unless someone has made one but just not shared it. Could be worth asking on the haxe mailing list / google group? You'll get a wider audience than on stack overflow.
If it looks like no one has done it, you can write your own... it's probably quite do-able. And not too hard either. I'd be happy to help you figure it out as you go... cause I might want to use it one day too :)
If you do decide to take that route I think the best option is to post on the mailing list, and we can help you out from there. There's also a document on the wiki with some instructions:
http://haxe.org/doc/js/extern_libraries
This stuff is always a bit daunting when you first get started, but don't be afraid to ask for help and hopefully you'll be up and running in no time.

Full text search for Rails 3

I’m evaluating full text search methods for Rails 3 ATM. Does anyone here have a recommendation? Seems to me as if most of the known methods (Sunspot, Sphinx, Ferret, Xapian) aren’t yet ready for Rails 3. Is that so? At the moment I’ve got plenty of resources left on the machine were I’d like to deploy my app but nevertheless, I’d like to keep the idle load for the search engine as low as possible. I’m planning to use PostgreSQL if that’s of any relevance here.
After some reading I’m almost sure that I’d like to use Sunspot or Xapian. But if there’s any other (and better) solution please tell me :-) Especially regarding Sunspot I’m not sure if it was clever to have a complete Tomcat running in addition to my Rails app. Anyone has experience with this constellation?
Thanks in advance,
Ulf
If you are using PostgreSQL you can get an awful lot out of its built-in text search capabilities before you need to reach for external libraries. I've been using tsearch queries for years with excellent results.
PostgreSQL full text search analyses word proximity to calculate Relevance & ranking and offers useful features like highlighting of search results.
It is also aware of language specific normalisation rules, for example it knows to ignore the s and es pluralization suffixes in English; so searches for 'country' will also bring back highlighted results for 'countries', much the same way that Google does.
I'm not suggesting that you shouldn't use the libraries that you've mentioned, but it is worth investigating the database to see if will already fulfil the majority, if not all of your requirements.
You can use sunspot with Rails3, no problem. We have done so successfully using the sunspot/sunspot_rails gems (1.2.rc4). And it's not too much of a hassle to run Solr within a Tomcat server.
For fulltext-search features you should use a search engine.
For example you could use the Lucene Library with jRuby.
If you like to stay with standard Ruby (cRuby) you coud use Solr.
For rails there are also some Solr plugins:
For example starting with http://wiki.apache.org/solr/SolRuby could be a good idea.
Sunspot is Rails3 ready, we're using it on a few Rails3 apps already. I've had a lot of success with Solr and Sunspot. So much that we're starting a blog series on it