Anyone know How to test CustomerAnalyzer with jsp?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone know How to test CustomerAnalyzer with jsp?

James liu-2
I don't know how to test,,Maybe someone can tell me.

Thks Chris Advice.


--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: Anyone know How to test CustomerAnalyzer with jsp?

Chris Hostetter-3
: Subject: Anyone know How to test CustomerAnalyzer with jsp?
:
: I don't know how to test,,Maybe someone can tell me.

how about something like...

<%
  Analyzer a = new CustomerAnalyzer();
  TokenStream t = a.tokenStream("f", new StringReader("test"));
%>
<%= t.next().toString() %>


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: Anyone know How to test CustomerAnalyzer with jsp?

James liu-2
Tomcat start error。

Does solr support java 1.6?

Test under winxp, tomcat 6.0, java 1.6

My test jsp code :

<%@ page import="org.apache.lucene.analysis.standard.StandardAnalyzer" %>
<html><body><center>
<%
 StandardAnalyzer a = new StandardAnalyzer();
 TokenStream t = a.tokenStream("f", new StringReader("test"));
%>
<%= t.next().toString() %>
</center></body></html>


i m jsp newer,,,tomcat show error information:        "StandardAnalyzer
cannot be resolved to a type"


and i use lucene 2.1 demo's IndexHTML,,,just modify analyzer to
myCustomerAnalyzer,,,,it can index. Can it say myCustomerAnalyzer is ok?



2007/3/15, Chris Hostetter <[hidden email]>:

>
> : Subject: Anyone know How to test CustomerAnalyzer with jsp?
> :
> : I don't know how to test,,Maybe someone can tell me.
>
> how about something like...
>
> <%
>   Analyzer a = new CustomerAnalyzer();
>   TokenStream t = a.tokenStream("f", new StringReader("test"));
> %>
> <%= t.next().toString() %>
>
>
> -Hoss
>
>


--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: Anyone know How to test CustomerAnalyzer with jsp?

James liu-2
i fix it by myself.

my analyzer base on two dll and one jar file.

jar file maybe complied by old java version.

i use java1.6 to recompile it.

Thk everybody who noticed my question and thk Chris...You are good people.