<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Espacio de Dario Quintana &#187; Lucene</title>
	<atom:link href="http://blog.darioquintana.com.ar/category/lucene/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.darioquintana.com.ar</link>
	<description></description>
	<lastBuildDate>Tue, 21 Jun 2011 22:51:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Analyzers en Lucene.Net</title>
		<link>http://blog.darioquintana.com.ar/2007/12/11/analyzers-en-lucenenet/</link>
		<comments>http://blog.darioquintana.com.ar/2007/12/11/analyzers-en-lucenenet/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 03:43:16 +0000</pubDate>
		<dc:creator>Dario Quintana</dc:creator>
				<category><![CDATA[Lucene]]></category>
		<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://blog.darioquintana.com.ar/2007/12/11/analyzers-en-lucenenet/</guid>
		<description><![CDATA[<p>En <a href="http://blog.darioquintana.com.ar/2007/12/09/nhibernate-search/">este post</a> est&#225;bamos viendo la integraci&#243;n de Lucene.Net con NHibernate mediante NHibernate Search.</p> <p>Lucene puede indexar texto desde muchas fuentes: PDF, HTML, Documentos de Word entre los m&#225;s conocidos y esto es lo que hace a Lucene muy usado por muchas <a href="http://wiki.apache.org/lucene-java/PoweredBy">aplicaciones reales</a> para solucionar problemas de b&#250;squeda. Luego que Lucene parsea [...]]]></description>
			<content:encoded><![CDATA[<p>En <a href="http://blog.darioquintana.com.ar/2007/12/09/nhibernate-search/">este post</a> est&#225;bamos viendo la integraci&#243;n de Lucene.Net con NHibernate mediante NHibernate Search.</p>
<p>Lucene puede indexar texto desde muchas fuentes: PDF, HTML, Documentos de Word entre los m&#225;s conocidos y esto es lo que hace a Lucene muy usado por muchas <a href="http://wiki.apache.org/lucene-java/PoweredBy">aplicaciones reales</a> para solucionar problemas de b&#250;squeda. Luego que Lucene parsea los documentos desde un medio rico, debe convertir este stream en un formato de tokens de texto plano para que los pueda digerir y as&#237; indexar el contenido. El paso previo a la indexaci&#243;n es el an&#225;lisis, y para esto se utilizan Analyzers. Lucene provee algunas clases que se pueden utilizar por ejemplo: <em>WhitespaceAnalyzer</em> que se encarga de tokenizar el texto sin tener en cuenta los espacios en blanco; <em>StopAnalyzer </em>que elimina las StopWords en Ingl&#233;s del texto para poder indexarlo, por ejemplo: <em>the, an, a, that, this</em>, entre otras.</p>
<p align="center"><img src="http://uooopaa.googlepages.com/lucene-parser-analyzer.png" /> </p>
<p>Usando <a href="http://blog.darioquintana.com.ar/2007/12/09/nhibernate-search/">NHibernate Search</a>, podemos realizar consultas contra los &#237;ndices que mantiene Lucene, ya sea en Memoria o en el propio sistema de archivos. Este es un ejemplo de una consulta usando NHibernate Search:</p>
</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:56d5ee07-0a42-4a84-87e3-1977d3cce389" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)

http://www.CodeHighlighter.com/

--><span style="color: #000000;">QueryParser qp </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> QueryParser(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Summary</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StopAnalyzer());
IQuery NHQuery </span><span style="color: #000000;">=</span><span style="color: #000000;"> s.CreateFullTextQuery(qp.Parse(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">series</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">), </span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Book));
IList result </span><span style="color: #000000;">=</span><span style="color: #000000;"> NHQuery.List();</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>QueryParser recibe como par&#225;metro un <em>Analyzer</em>, en este caso <em>StopAnalyzer. </em>Utilizando este Analyzer, Lucene encuentra los t&#233;rminos de b&#250;squeda dentro del texto de b&#250;squeda. Esto no tiene nada que ver con el Analyzer que se configura Lucene al comienzo, que indica la manera en que se van a filtrar los tokens que van almacenarse al Index. Este analyzer realiza un filtro en el string de b&#250;squeda para encontrar las keywords de referencia a buscar.</p>
<p>Para entender un poco m&#225;s sobre los Analyzer, realic&#233; esta aplicaci&#243;n de consola basado en los ejemplos en Java de <em>Lucene In Action, </em>bueno&#8230; en realidad solo fue una traducci&#243;n de Java a C# de los ejemplos que hab&#237;a. La idea es probar que tokens de salida producen distintos Analyzers ante una entrada de texto:</p>
<p><img src="http://uooopaa.googlepages.com/lucene-output.png" /></p>
<p>En este ejemplo utilic&#233; dos analyzer de Lucene y uno personalizado a unas cuantas Stop Words del Espa&#241;ol:&#160; <a href="http://darioquintana.googlecode.com/svn/trunk/Examples/SpanishStopWordsAnalyzer/SpanishStopAnalyzer.cs">SpanishStopAnalyzer</a>. El programa que utilic&#233; para correr ejemplo pueden hacer un checkout <a href="http://darioquintana.googlecode.com/svn/trunk/Examples/SpanishStopWordsAnalyzer/">de aqu&#237;</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.darioquintana.com.ar/2007/12/11/analyzers-en-lucenenet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NHibernate Search</title>
		<link>http://blog.darioquintana.com.ar/2007/12/09/nhibernate-search/</link>
		<comments>http://blog.darioquintana.com.ar/2007/12/09/nhibernate-search/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 21:12:50 +0000</pubDate>
		<dc:creator>Dario Quintana</dc:creator>
				<category><![CDATA[Lucene]]></category>
		<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://blog.darioquintana.com.ar/2007/12/09/nhibernate-search/</guid>
		<description><![CDATA[<p><a href="http://darioquintana.com.ar/blogging/?p=21">English post</a></p> <p>Una de las caracter&#237;sticas nuevas de <a href="http://www.hibernate.org/343.html">NHibernate</a> portadas de Hibernate 3.2 es <a href="http://www.hibernate.org/410.html">NHibernate Search</a>. <a href="http://incubator.apache.org/lucene.net/">Lucene</a> es el motor de b&#250;squeda de textos usado por NHibernate que permite a las aplicaciones a realizar consultas sobre texto almacenado. Esta caracter&#237;stica est&#225; disponible en <a href="http://sourceforge.net/project/showfiles.php?group_id=73818&#38;package_id=73969">NHibernate 1.2.1</a> o en NHibernate 2.0 (<a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://darioquintana.com.ar/blogging/?p=21">English post</a></p>
<p>Una de las caracter&#237;sticas nuevas de <a href="http://www.hibernate.org/343.html">NHibernate</a> portadas de Hibernate 3.2 es <a href="http://www.hibernate.org/410.html">NHibernate Search</a>. <a href="http://incubator.apache.org/lucene.net/">Lucene</a> es el motor de b&#250;squeda de textos usado por NHibernate que permite a las aplicaciones a realizar consultas sobre texto almacenado. Esta caracter&#237;stica est&#225; disponible en <a href="http://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969">NHibernate 1.2.1</a> o en NHibernate 2.0 (<a href="https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/">versi&#243;n del SVN</a>).</p>
<p>El ejemplo de NHibernate Search con NHibernate 2.0 est&#225; disponible para la descarga aqu&#237;:</p>
<h4><a href="http://darioquintana.googlecode.com/files/NHibernateSearch-Demo.7z">NHibernate Search Demo</a></h4>
<p>Para poder hacer b&#250;squedas sobre el texto de nuestras entidades debemos decorar nuestros objetos de negocio con algunos atributos como se muestra aqu&#237;:</p>
</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:7c895bf9-783d-4387-9fef-f150294912f6" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)

http://www.CodeHighlighter.com/

--><span style="color: #000000;">    </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> NHibernate.Search;
    </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> NHibernate.Search.Attributes;

    [Indexed]
    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> Book {
        </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> author;
        </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> id;
        </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> name;
        </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> summary;

        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> Book() {
        }

        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> Book(</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> id,</span><span style="color: #0000FF;">string</span><span style="color: #000000;"> author, </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> name, </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> summary) {
            </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.id </span><span style="color: #000000;">=</span><span style="color: #000000;"> id;
            </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.author </span><span style="color: #000000;">=</span><span style="color: #000000;"> author;
            </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.name </span><span style="color: #000000;">=</span><span style="color: #000000;"> name;
            </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.summary </span><span style="color: #000000;">=</span><span style="color: #000000;"> summary;
        }

        [DocumentId]
        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">virtual</span><span style="color: #000000;"> </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> Id {
            </span><span style="color: #0000FF;">get</span><span style="color: #000000;"> { </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> id; }
            </span><span style="color: #0000FF;">set</span><span style="color: #000000;"> { id </span><span style="color: #000000;">=</span><span style="color: #000000;"> value; }
        }

        [Field(Index.Tokenized, Store </span><span style="color: #000000;">=</span><span style="color: #000000;"> Store.Yes)]
        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">virtual</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> Author {
            </span><span style="color: #0000FF;">get</span><span style="color: #000000;"> { </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> author; }
            </span><span style="color: #0000FF;">set</span><span style="color: #000000;"> { author </span><span style="color: #000000;">=</span><span style="color: #000000;"> value; }
        }

        [Field(Index.Tokenized, Store </span><span style="color: #000000;">=</span><span style="color: #000000;"> Store.Yes)]
        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">virtual</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> Summary {
            </span><span style="color: #0000FF;">get</span><span style="color: #000000;"> { </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> summary; }
            </span><span style="color: #0000FF;">set</span><span style="color: #000000;"> { summary </span><span style="color: #000000;">=</span><span style="color: #000000;"> value; }
        }

        [Field(Index.Tokenized, Store </span><span style="color: #000000;">=</span><span style="color: #000000;"> Store.Yes)]
        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">virtual</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> Name {
            </span><span style="color: #0000FF;">get</span><span style="color: #000000;"> { </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> name; }
            </span><span style="color: #0000FF;">set</span><span style="color: #000000;"> { name </span><span style="color: #000000;">=</span><span style="color: #000000;"> value; }
        }
    }</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>No se puede realizar la configuraci&#243;n v&#237;a el archivo <em>hibernate.cfg.xml</em> todav&#237;a. La configuraci&#243;n debe lucir como se muestra abajo. Hay unos pasos adicionales a tener en cuenta a la hora de configurar NHibernate Search en nuestra aplicaci&#243;n.</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:11755995-82e8-49d5-a215-53c8f0f409da" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)

http://www.CodeHighlighter.com/

--><span style="color: #000000;">cfg </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Configuration();
cfg.SetProperty(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">hibernate.search.default.directory_provider</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,
                </span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(RAMDirectoryProvider).AssemblyQualifiedName);
cfg.SetProperty(NHibernate.Search.Environment.AnalyzerClass,
                </span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(StopAnalyzer).AssemblyQualifiedName);
cfg.Configure();
sf </span><span style="color: #000000;">=</span><span style="color: #000000;"> cfg.BuildSessionFactory();
SearchFactory.Initialize(cfg, sf);</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Cre&#233; 3 libros (Book) para poder hacer este ejemplo funcional:</p>
</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:e1a697c2-64d3-454d-a55c-df12ab7d78c6" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 706px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)

http://www.CodeHighlighter.com/

--><span style="color: #0000FF;">using</span><span style="color: #000000;"> (IFullTextSession s </span><span style="color: #000000;">=</span><span style="color: #000000;"> Search.CreateFullTextSession(sf.OpenSession(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SearchInterceptor()))) {
    </span><span style="color: #0000FF;">using</span><span style="color: #000000;">(ITransaction tx </span><span style="color: #000000;">=</span><span style="color: #000000;"> s.BeginTransaction()){
        Book b1 </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Book(</span><span style="color: #800080;">1</span><span style="color: #000000;">,
            </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Eric Evans</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,
            </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Domain-Driven Design: Tackling Complexity in the Heart of Software</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,
            </span><span style="color: #800000;">@&quot;</span><span style="color: #800000;">This book provides a broad framework for making design decisions and a
            technical vocabulary for discussing domain design. It is a synthesis of
            widely accepted best practices along with the author's own insights and experiences.</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
            );

        s.Save(b1);

        Book b2 </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Book(</span><span style="color: #800080;">2</span><span style="color: #000000;">,
            </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Pierre Kuate</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,
            </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">NHibernate in Action</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,
            </span><span style="color: #800000;">@&quot;</span><span style="color: #800000;">In the classic style of Manning's 'In Action' series, NHibernate in Action introduces
            .NET developers to the NHibernate Object/Relational Mapping tool. As NHibernate is a
            port of Hibernate from Java to .NET.</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
        s.Save(b2);

        Book b3 </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Book(</span><span style="color: #800080;">3</span><span style="color: #000000;">,
            </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">John Doe</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,
            </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Foo book NHibernate</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,
            </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Foo series book</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
        s.Save(b3);

        s.Flush();
        tx.Commit();
    }
}</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>Realizamos algunas consultas de texto sobre este escenario. El ejemplo a continuaci&#243;n es utilizando la interfase <em>IQuery</em>. El motor de b&#250;squeda de texto tratar&#225; de encontrar la palabra &quot;series&quot; en las propiedad <em>Summary</em>.</p>
</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:037b0ebb-5c15-4d14-b10f-aaa8737e7023" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 718px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)

http://www.CodeHighlighter.com/

--><span style="color: #0000FF;">using</span><span style="color: #000000;"> (IFullTextSession s </span><span style="color: #000000;">=</span><span style="color: #000000;"> Search.CreateFullTextSession(sf.OpenSession(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SearchInterceptor()))) {

        QueryParser qp </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> QueryParser(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">id</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StopAnalyzer());

        IQuery NHQuery </span><span style="color: #000000;">=</span><span style="color: #000000;"> s.CreateFullTextQuery(qp.Parse(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Summary:series</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">), </span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Book));

        IList result </span><span style="color: #000000;">=</span><span style="color: #000000;"> NHQuery.List();

        Debug.Assert(result.Count </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #800080;">2</span><span style="color: #000000;">);
}</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>Y este ejemplo a continuaci&#243;n es usando <em>Criteria</em>. El ejemplo trata de encontrar el texto &quot;NHibernate&quot; en las propiedades <em>Summary</em> (resume) y <em>Name </em>(nombre del libro)</p>
</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:e568408b-37f2-4cd2-922c-a6e398bf098f" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 711px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)

http://www.CodeHighlighter.com/

--><span style="color: #0000FF;">using</span><span style="color: #000000;"> (IFullTextSession s </span><span style="color: #000000;">=</span><span style="color: #000000;"> Search.CreateFullTextSession(sf.OpenSession(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SearchInterceptor()))) {

        IList result </span><span style="color: #000000;">=</span><span style="color: #000000;"> s.CreateCriteria(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Book))
            .Add(Search.Query(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Summary:NHibernate or Name:NHibernate</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">))
            .List();

        Debug.Assert(result.Count </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #800080;">2</span><span style="color: #000000;">);
}</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>Como se puede apreciar, para realizar las b&#250;squedas se debe usar la interfase&#160; <em>IFullTextSession</em> en vez de las conocidas hasta el momento <em>ISession o IStatelessSession</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.darioquintana.com.ar/2007/12/09/nhibernate-search/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

