java-user@lucene.apache.org
[Top] [All Lists]

RE: Search result snippets?

Subject: RE: Search result snippets?
From: "Koji Sekiguchi"
Date: Sat, 7 Jan 2006 08:24:03 +0900
Hi Dan,

I've experienced same error you are facing. Check out:

http://www.gossamer-threads.com/lists/lucene/java-user/28554?search_string=T
ermVectorOffsetInfo;#28554

Hope this helps.

Koji


> -----Original Message-----
> From: Dan Frankowski [mailto:dfrankow@xxxxxxxxxx]
> Sent: Saturday, January 07, 2006 8:00 AM
> To: java-user@xxxxxxxxxxxxxxxxx
> Subject: Re: Search result snippets?
>
>
> Chris,
>
> Thanks, I have signed up for the wiki and will put in the answer when I
> fully understand it.
>
> Otis,
>
> So, I downloaded the Highlighter code with
>
> svn checkout
> http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/highligh
> ter/src/java/org/apache/lucene/search/highlight/
>
> Then I tried to compile it with lucene.jar, version 1.4.3. I get
> compile-time errors (attached at the bottom of this message) for missing
> classes. One of them is org.apache.lucene.index.TermVectorOffsetInfo.
> For example,
> % jar tvf lib/lucene.jar | grep TermVectorOffset
> <nothing ...>
> % jar xvf ../work/jspwiki/JSPWiki/lib/lucene.jar  META-INF/MANIFEST.MF
> inflated: META-INF/MANIFEST.MF
> dfrankow@gibson (~/windows/tmp) % cat META-INF/MANIFEST.MF
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.6.1
> Created-By: Apache Jakarta
>
> Name: org/apache/lucene
> Specification-Title: Lucene Search Engine
> Specification-Version: 1.4.3
> Specification-Vendor: Lucene
> Implementation-Title: org.apache.lucene
> Implementation-Version: build 2004-11-29 15:13:05
> Implementation-Vemdpr: Lucene
>
> I looked for TermVectorOffsetInfo in jar version 1.4.3, 1.4, 1.3, and
> 1.2, and could not find it.
>
> Someone asked about this on March 11
> (http://mail-archives.apache.org/mod_mbox/lucene-java-user/200503.
> mbox/%3C20050311062700.46656.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxxx%3E).
> You said to check out the trunk of Lucene, but I have to work with
> Lucene 1.4.3 in an existing project. I can't work with a version from SVN.
>
> Suggestions? Is there a version of Highlighter that works with 1.4.3? If
> it compiles for you, where do you get TermVectorOffsetInfo, and is that
> in 1.4.3?
>
> Thanks in advance.
>
> Dan
>
> Chris Hostetter wrote:
>
> >: Thanks for this tip! This should be in the FAQ. Is there a way
> to get it
> >: in there? I can't edit the wiki, I think.
> >
> >1) People who create a Wiki account can edit the FAQ.
> >
> >2) the FAQ already includes a refrence to Highlighter, I think it's the
> >FAQ entry you mentioned...
> >
> >http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-0c15966e2ee7
755f4ae639ee8eaf7de04f5c27f5
> >
> >   Is there a way to get a text summary of an indexed document
> with Lucene?
> >
> >   You could store the documents summary in the index and then use the
> >   Highlighter from the sandbox.
> >
> >...feel free to add to the FAQ whatever information you think would have
> >made the answer more useful to you when you first found it.
> >
> >
> >: >How would you implement "snippets" with Lucene? A snippet is some text
> >: >around parts of the text that caused a match, with the search
> matches in
> >: >bold. For example, the supporting text in Google searches. A
> snippet is
> >: >NOT a document summary, which has a FAQ entry and someone
> answered about
> >: >on this email list.
> >
> >
> >-Hoss
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
> >For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx
> >
> >
>
> ====
>
>     [javac]
> .../JSPWiki/src/org/apache/lucene/search/highlight/TokenSources.java:19:
> cannot find symbol
>     [javac] symbol  : class TermVectorOffsetInfo
>     [javac] location: package org.apache.lucene.index
>     [javac] import org.apache.lucene.index.TermVectorOffsetInfo;
>     [javac]                                ^
>     [javac]
> .../JSPWiki/src/org/apache/lucene/search/highlight/TokenSources.java:124:
> cannot find symbol
>     [javac] symbol  : class TermVectorOffsetInfo
>     [javac] location: class
> org.apache.lucene.search.highlight.TokenSources
>     [javac]             TermVectorOffsetInfo[] offsets=tpv.getOffsets(t);
>     [javac]             ^
>     [javac]
> .../JSPWiki/src/org/apache/lucene/search/highlight/TokenSources.java:124:
> cannot find symbol
>     [javac] symbol  : method getOffsets(int)
>     [javac] location: interface org.apache.lucene.index.TermPositionVector
>     [javac]             TermVectorOffsetInfo[] offsets=tpv.getOffsets(t);
>     [javac]                                               ^
>     [javac]
> .../JSPWiki/src/org/apache/lucene/search/highlight/TokenSources.java:145:
> internal error; cannot instantiate Token(java.lang.String,int,int) at
> org.apache.lucene.analysis.Token to ()
>     [javac]                     unsortedTokens.add(new Token(terms[t],
>     [javac]                                        ^
>     [javac]
> .../JSPWiki/src/org/apache/lucene/search/highlight/TokenSources.java:160:
> internal error; cannot instantiate Token(java.lang.String,int,int) at
> org.apache.lucene.analysis.Token to ()
>     [javac]                     tokensInOriginalOrder[pos[tp]]=new
> Token(terms[t],
>     [javac]                                                    ^
>     [javac] 5 errors
>
> BUILD FAILED
> .../JSPWiki/build.xml:216: Compile failed; see the compiler error output
> for details.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>