camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Bug in camel-lucene component
Date Thu, 03 Feb 2011 10:31:54 GMT
On Thu, Feb 3, 2011 at 11:28 AM, Peter Thygesen
<peter.thygesen@gmail.com> wrote:
> When indexing using Lucene Component I get an exception:
>
> java.lang.ClassCastException: java.lang.Boolean cannot be cast to
> java.lang.String
>
> I look like the index(Exchange exchange) (line 72) method on LuceneIndexer
> iterates over all the header key/value pairs and adds them to the index. In
> this process it cast headers.get(field) to String. This doesn¹t work for
> Boolean values.
>
> BTW
> When I look at the Indexer code.. I¹m not sure it perticullar smart... Looks
> like it creates a document for each header attribute and the body. And opens
> and closes the index repeatly...
>
> This was my setup:
> Camel 2.5
>
> Route:
>  from("file:src/data?noop=true")
>    .bean(³doSomethingWithTheContentAndReplaceBodyBean²)
>
> .to("lucene:MyIndex:insert?analyzer=#analyzer&indexDir=#index&srcDir=#source
> ");
>

Yeah could you create a JIRA ticket?

Link from here:
http://camel.apache.org/support

And we love contributions so you are welcome to work on a patch.
What it should do is of course to leverage the type converters in
Camel. Then you just ask it to return the value as a String.

And yeah we should optimize the logic. You are welcome to take a look
how that's possible.


> Thx.
> /Peter Thygesen
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message