Reg: Carrot2 integration with Lucene Indexes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Reg: Carrot2 integration with Lucene Indexes

Ezhil
Hi,
 
I have a requirement to integrate external sources (Lucene generated index) with Carrot2.
 
- I have deployed carrot2-webapp-3.0.1.war in Tomcat server 6.0 and then done below steps to get Lucene tab in WebApp.
 
1. Edited suite-webapp.xml (source tag) to get Lucene Tab 

(<source component-class="org.carrot2.source.lucene.LuceneDocumentSource" id="wiki" attribute-sets-resource="lucene.xml">)

In lucene.xml, configured <indexPath> to local Lucene index directory.

Now, I am able to get Lucene tab in my WebApp and able to get search results in Tree and Visualization.

Issue: Search Results are not clickable (seems Search results (URL & Summary fields seems to be returned as null)

Please help on this issue to get Search Results clickable.

Thanks and Regards,

Ezhilmuthu, T


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Reg: Carrot2 integration with Lucene Indexes

Dawid Weiss-2
> (<source component-class="org.carrot2.source.lucene.LuceneDocumentSource"
> id="wiki" attribute-sets-resource="lucene.xml">)

By default Lucene input component maps Carrot2 fields URL, Title and
Summary to Lucene fields with the same name. If these fields are not
in your index, the results will show blank fields. You can alter the
default by overriding attribute sets (lucene.xml in your code above).
There should be a fragment saying:

      <attribute key="org.carrot2.source.lucene.SimpleFieldMapper.contentField">
        <value type="java.lang.String" value="summary"/>
      </attribute>

      <attribute key="org.carrot2.source.lucene.SimpleFieldMapper.titleField">
        <value type="java.lang.String" value="title"/>
      </attribute>

this means the title will be mapped to "title" field in Lucene and
summary to "summary" in Lucene (change as you wish). The URL can also
be mapped this way. Say, Lucene contains a field "my_url", then
adding:

      <attribute key="org.carrot2.source.lucene.SimpleFieldMapper.titleField">
        <value type="java.lang.String" value="urlField"/>
      </attribute>

should make your search results clickable.

Dawid

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: [C2-devel] Reg: Carrot2 integration with Lucene Indexes

Ezhil
Hi,
 
Thanks for your input. After mapping urlPath, titile and bodyContents, I am able to get results and Clickable. 
 
Currently I have another problem.
 
Issue: Search results are not matching
 
Actually as per my understanding my Lucene index was done based on urlPath, titile and bodyContents.
For integration with Carrot2, same fields I have configured.
 
Why there is a mismatch between two searchs results? Can we include additional fields or maximum three fields only allowed?
 
Please help me on this issue to get same results in both searches.
 
 
 
Thanks and Regards,
Ezhilmuthu,T

 
On 8/13/09, JIRA [hidden email] (via Nabble) <[hidden email]> wrote:
> (<source component-class="org.carrot2.source.lucene.LuceneDocumentSource"
> id="wiki" attribute-sets-resource="lucene.xml">)

By default Lucene input component maps Carrot2 fields URL, Title and
Summary to Lucene fields with the same name. If these fields are not
in your index, the results will show blank fields. You can alter the
default by overriding attribute sets (lucene.xml in your code above).
There should be a fragment saying:

      <attribute key="org.carrot2.source.lucene.SimpleFieldMapper.contentField">
        <value type="java.lang.String" value="summary"/>
      </attribute>

      <attribute key="org.carrot2.source.lucene.SimpleFieldMapper.titleField">
        <value type="java.lang.String" value="title"/>
      </attribute>

this means the title will be mapped to "title" field in Lucene and
summary to "summary" in Lucene (change as you wish). The URL can also
be mapped this way. Say, Lucene contains a field "my_url", then
adding:

      <attribute key="org.carrot2.source.lucene.SimpleFieldMapper.titleField">
        <value type="java.lang.String" value="urlField"/>
      </attribute>

should make your search results clickable.

Dawid

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://p.sf.net/sfu/bobj-july" target="_blank" rel="nofollow">http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=3435829&amp;i=0" target="_blank" rel="nofollow">[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/carrot2-developers" target="_blank" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/carrot2-developers



View message @ <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://n2.nabble.com/Reg%3A-Carrot2-integration-with-Lucene-Indexes-tp3431375p3435829.html" target="_blank">http://n2.nabble.com/Reg%3A-Carrot2-integration-with-Lucene-Indexes-tp3431375p3435829.html
To start a new topic under Carrot2 Users and Developers Forum, email [hidden email]
To unsubscribe from Carrot2 Users and Developers Forum, <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://n2.nabble.com/subscriptions/Unsubscribe.jtp?code=dGV6aGlsbXV0aHVAZ21haWwuY29tfDYwNzU3MXwtMTI5OTQxODE5Mg==" target="_blank">click here.


Reply | Threaded
Open this post in threaded view
|

Re: Reg: Carrot2 integration with Lucene Indexes

Dawid Weiss-2
> Issue: Search results are not matching

Look at the source code of Lucene input component, please -- Lucene is
so flexible that it's not possible to write a fully configurable
component (because the configuration options are so immense). You can
simply adjust the code to your needs and recompile it, but I would
first take a look at the field called IFieldMapper -- the default
implementation has an array of search fields over which the search is
issued, if you set this attribute to match your index, this may help.

Dawid

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: [C2-devel] Reg: Carrot2 integration with Lucene Indexes

Ezhil
Hi,
 
Thanks for your valuable input. As suggested, I will try to modify and give a try.
 
Thanks and Regards,
Ezhilmuthu, T
On Sat, Aug 15, 2009 at 12:07 AM, JIRA [hidden email] (via Nabble) <[hidden email]> wrote:
> Issue: Search results are not matching

Look at the source code of Lucene input component, please -- Lucene is
so flexible that it's not possible to write a fully configurable
component (because the configuration options are so immense). You can
simply adjust the code to your needs and recompile it, but I would
first take a look at the field called IFieldMapper -- the default
implementation has an array of search fields over which the search is
issued, if you set this attribute to match your index, this may help.

Dawid

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers



View message @ http://n2.nabble.com/Reg%3A-Carrot2-integration-with-Lucene-Indexes-tp3431375p3446767.html
To start a new topic under Carrot2 Users and Developers Forum, email [hidden email]
To unsubscribe from Carrot2 Users and Developers Forum, click here.