You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ingo Renner <in...@typo3.org> on 2009/09/08 11:24:13 UTC

Lucid's Solr Showcase, MLT?

Hi all,

I'm currently trying to build something similar to Lucid  
imaginations's Solr showcase. There you can select a single message  
and get all the related messages from the same thread as a menu on the  
left.
How is that done? Is that menu using Solr's More Like This feature?  
How is the initially requested message remembered and highlighted  
accordingly?
http://www.lucidimagination.com/search/document/5225d37bc6671a12/uncommitted_documents_coutn_with_autocommit_enabled

Currently I've indexed a couple of newsgroups and am storing a  
message's ID (like <mailman.1.1158273473.789.typo3-team-core@lists.netfielders.de 
 >) in a field called "messageId".

<field name="messageId" type="string" indexed="true" stored="true"  
termVectors="true" />

Then I also store all references, which are also message IDs in a  
field "references". (multiple space separated messageIds)

<fieldType name="text_ws" class="solr.TextField"  
positionIncrementGap="100">
	<analyzer>
		<tokenizer class="solr.WhitespaceTokenizerFactory"/>
		<filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
	</analyzer>
</fieldType>

<field name="references" type="text_ws" indexed="true" stored="true"  
termVectors="true" />

Now I'm trying to get the currently selected message through Solr  
using the accordant document's ID.
When trying to use the messageId and references fields in MLT I can't  
get it to return the expected documents related to the same thread. In  
fact there're no documents returned at all, except for the initial  
message. To me it seems that Solr is unable to determine  
interestingTerms as they're empty.

Here're the query parameters I'm using:
qt=mlt
q=id:0a904000c5dc7a72fa45ed0063b4389c/typo3.teams.core/0/5799/ 
nntpArticle
mlt.fl=messageId,references
mlt.match.include=true
mlt.interestingTerms=details
fl=*,score
debugQuery=true

I'm running a Solr 1.4 nightly in case that's of interest.


Any insights would be interesting and highly appreciated.

all the best
Ingo


-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2