FAQ
I am using netbeans on windows to test lucene.
I have added all the lib files from the /lib directory to my project library.
down the end of Indexer.java program, it states the Field.Text method
is not available
the error message is as follows
---------------------------------------------------------------------------------------------------------------

C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18: duplicate
class: lia.meetlucene.Indexer
public class Indexer {
C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:80:
cannot find symbol
symbol : method Text(java.lang.String,java.io.FileReader)
location: class org.apache.lucene.document.Field
doc.add(Field.Text("contents", new FileReader(f)));
C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:81:
cannot find symbol
symbol : method Keyword(java.lang.String,java.lang.String)
location: class org.apache.lucene.document.Field
doc.add(Field.Keyword("filename", f.getCanonicalPath()));
Note: C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
BUILD FAILED (total time: 2 seconds)
-----------------------------------------------------------------------------------------------------------------------------------
what is wrong?
it underlines in red for the folowing code....
=========================================================
Document doc = new Document();
doc.add(Field.Text("contents", new FileReader(f)));
doc.add(Field.Keyword("filename", f.getCanonicalPath()));
writer.addDocument(doc);
===================================================

seid m
--
"RABI ZIDNI ILMA"

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Erick Erickson at Feb 19, 2009 at 4:02 pm
    LIA was written for a pretty early version of Lucene, if you're using a
    recent
    release you need to modify the code to be compliant with that version.

    Or install an older release of Lucene.

    Erick
    On Thu, Feb 19, 2009 at 10:41 AM, Seid Mohammed wrote:

    I am using netbeans on windows to test lucene.
    I have added all the lib files from the /lib directory to my project
    library.
    down the end of Indexer.java program, it states the Field.Text method
    is not available
    the error message is as follows

    ---------------------------------------------------------------------------------------------------------------

    C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18: duplicate
    class: lia.meetlucene.Indexer
    public class Indexer {

    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:80:
    cannot find symbol
    symbol : method Text(java.lang.String,java.io.FileReader)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Text("contents", new FileReader(f)));

    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:81:
    cannot find symbol
    symbol : method Keyword(java.lang.String,java.lang.String)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    Note:
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java
    uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    BUILD FAILED (total time: 2 seconds)

    -----------------------------------------------------------------------------------------------------------------------------------
    what is wrong?
    it underlines in red for the folowing code....
    =========================================================
    Document doc = new Document();
    doc.add(Field.Text("contents", new FileReader(f)));
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    writer.addDocument(doc);
    ===================================================

    seid m
    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Seid Mohammed at Feb 19, 2009 at 4:14 pm
    I better modify it, but can you give just a hint on how to modify
    thanks a lot

    Seid M
    On 2/19/09, Erick Erickson wrote:
    LIA was written for a pretty early version of Lucene, if you're using a
    recent
    release you need to modify the code to be compliant with that version.

    Or install an older release of Lucene.

    Erick
    On Thu, Feb 19, 2009 at 10:41 AM, Seid Mohammed wrote:

    I am using netbeans on windows to test lucene.
    I have added all the lib files from the /lib directory to my project
    library.
    down the end of Indexer.java program, it states the Field.Text method
    is not available
    the error message is as follows

    ---------------------------------------------------------------------------------------------------------------

    C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18: duplicate
    class: lia.meetlucene.Indexer
    public class Indexer {

    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:80:
    cannot find symbol
    symbol : method Text(java.lang.String,java.io.FileReader)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Text("contents", new FileReader(f)));

    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:81:
    cannot find symbol
    symbol : method Keyword(java.lang.String,java.lang.String)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    Note:
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java
    uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    BUILD FAILED (total time: 2 seconds)

    -----------------------------------------------------------------------------------------------------------------------------------
    what is wrong?
    it underlines in red for the folowing code....
    =========================================================
    Document doc = new Document();
    doc.add(Field.Text("contents", new FileReader(f)));
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    writer.addDocument(doc);
    ===================================================

    seid m
    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Erick Erickson at Feb 19, 2009 at 6:03 pm
    Unfortunately, not really. I haven't tried to get the LIA examples
    working for years...

    The various release notes on the Wiki, especially the 1.9 and 2.0 release
    notes are probably the best place to start.

    Best
    Erick
    On Thu, Feb 19, 2009 at 11:13 AM, Seid Mohammed wrote:

    I better modify it, but can you give just a hint on how to modify
    thanks a lot

    Seid M
    On 2/19/09, Erick Erickson wrote:
    LIA was written for a pretty early version of Lucene, if you're using a
    recent
    release you need to modify the code to be compliant with that version.

    Or install an older release of Lucene.

    Erick
    On Thu, Feb 19, 2009 at 10:41 AM, Seid Mohammed wrote:

    I am using netbeans on windows to test lucene.
    I have added all the lib files from the /lib directory to my project
    library.
    down the end of Indexer.java program, it states the Field.Text method
    is not available
    the error message is as follows
    ---------------------------------------------------------------------------------------------------------------
    C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18: duplicate
    class: lia.meetlucene.Indexer
    public class Indexer {
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:80:
    cannot find symbol
    symbol : method Text(java.lang.String,java.io.FileReader)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Text("contents", new FileReader(f)));
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:81:
    cannot find symbol
    symbol : method Keyword(java.lang.String,java.lang.String)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    Note:
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java
    uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    BUILD FAILED (total time: 2 seconds)
    -----------------------------------------------------------------------------------------------------------------------------------
    what is wrong?
    it underlines in red for the folowing code....
    =========================================================
    Document doc = new Document();
    doc.add(Field.Text("contents", new FileReader(f)));
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    writer.addDocument(doc);
    ===================================================

    seid m
    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Michael McCandless at Feb 19, 2009 at 7:01 pm
    The early access version of LIA2 (accessible at http://www.manning.com/hatcher3/)
    has updated this example to work with recent Lucene releases (though
    it's still using deprecated APIs -- that'll be fixed before the book
    is released).

    Oh actually the first chapter is a free PDF on Manning's site.

    Mike

    Erick Erickson wrote:
    Unfortunately, not really. I haven't tried to get the LIA examples
    working for years...

    The various release notes on the Wiki, especially the 1.9 and 2.0
    release
    notes are probably the best place to start.

    Best
    Erick
    On Thu, Feb 19, 2009 at 11:13 AM, Seid Mohammed wrote:

    I better modify it, but can you give just a hint on how to modify
    thanks a lot

    Seid M
    On 2/19/09, Erick Erickson wrote:
    LIA was written for a pretty early version of Lucene, if you're
    using a
    recent
    release you need to modify the code to be compliant with that
    version.

    Or install an older release of Lucene.

    Erick

    On Thu, Feb 19, 2009 at 10:41 AM, Seid Mohammed <seidymam@gmail.com>
    wrote:
    I am using netbeans on windows to test lucene.
    I have added all the lib files from the /lib directory to my
    project
    library.
    down the end of Indexer.java program, it states the Field.Text
    method
    is not available
    the error message is as follows
    ---------------------------------------------------------------------------------------------------------------
    C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18:
    duplicate
    class: lia.meetlucene.Indexer
    public class Indexer {
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java:80:
    cannot find symbol
    symbol : method Text(java.lang.String,java.io.FileReader)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Text("contents", new FileReader(f)));
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java:81:
    cannot find symbol
    symbol : method Keyword(java.lang.String,java.lang.String)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    Note:
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java
    uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    BUILD FAILED (total time: 2 seconds)
    -----------------------------------------------------------------------------------------------------------------------------------
    what is wrong?
    it underlines in red for the folowing code....
    =========================================================
    Document doc = new Document();
    doc.add(Field.Text("contents", new FileReader(f)));
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    writer.addDocument(doc);
    ===================================================

    seid m
    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Seid Mohammed at Feb 21, 2009 at 6:53 am
    tanks erick
    i have got the latest INDEXER example from lia2 working properly
    thanks a lot

    Seid M
    On 2/19/09, Michael McCandless wrote:

    The early access version of LIA2 (accessible at
    http://www.manning.com/hatcher3/)
    has updated this example to work with recent Lucene releases (though
    it's still using deprecated APIs -- that'll be fixed before the book
    is released).

    Oh actually the first chapter is a free PDF on Manning's site.

    Mike

    Erick Erickson wrote:
    Unfortunately, not really. I haven't tried to get the LIA examples
    working for years...

    The various release notes on the Wiki, especially the 1.9 and 2.0
    release
    notes are probably the best place to start.

    Best
    Erick

    On Thu, Feb 19, 2009 at 11:13 AM, Seid Mohammed <seidymam@gmail.com>
    wrote:
    I better modify it, but can you give just a hint on how to modify
    thanks a lot

    Seid M
    On 2/19/09, Erick Erickson wrote:
    LIA was written for a pretty early version of Lucene, if you're
    using a
    recent
    release you need to modify the code to be compliant with that
    version.

    Or install an older release of Lucene.

    Erick

    On Thu, Feb 19, 2009 at 10:41 AM, Seid Mohammed <seidymam@gmail.com>
    wrote:
    I am using netbeans on windows to test lucene.
    I have added all the lib files from the /lib directory to my
    project
    library.
    down the end of Indexer.java program, it states the Field.Text
    method
    is not available
    the error message is as follows
    ---------------------------------------------------------------------------------------------------------------
    C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18:
    duplicate
    class: lia.meetlucene.Indexer
    public class Indexer {
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java:80:
    cannot find symbol
    symbol : method Text(java.lang.String,java.io.FileReader)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Text("contents", new FileReader(f)));
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java:81:
    cannot find symbol
    symbol : method Keyword(java.lang.String,java.lang.String)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    Note:
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java
    uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    BUILD FAILED (total time: 2 seconds)
    -----------------------------------------------------------------------------------------------------------------------------------
    what is wrong?
    it underlines in red for the folowing code....
    =========================================================
    Document doc = new Document();
    doc.add(Field.Text("contents", new FileReader(f)));
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    writer.addDocument(doc);
    ===================================================

    seid m
    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Erik Hatcher at Feb 21, 2009 at 9:54 am
    Also, the first several hits here provide the tricks to update the
    code to the latest API:

    <http://www.lucidimagination.com/search/?q=lucene+in+action+examples+update
    :)
    Erik

    On Feb 19, 2009, at 10:41 AM, Seid Mohammed wrote:

    I am using netbeans on windows to test lucene.
    I have added all the lib files from the /lib directory to my project
    library.
    down the end of Indexer.java program, it states the Field.Text method
    is not available
    the error message is as follows
    ---------------------------------------------------------------------------------------------------------------

    C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18: duplicate
    class: lia.meetlucene.Indexer
    public class Indexer {
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java:80:
    cannot find symbol
    symbol : method Text(java.lang.String,java.io.FileReader)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Text("contents", new FileReader(f)));
    C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java:81:
    cannot find symbol
    symbol : method Keyword(java.lang.String,java.lang.String)
    location: class org.apache.lucene.document.Field
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    Note: C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene
    \Indexer.java
    uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    BUILD FAILED (total time: 2 seconds)
    -----------------------------------------------------------------------------------------------------------------------------------
    what is wrong?
    it underlines in red for the folowing code....
    =========================================================
    Document doc = new Document();
    doc.add(Field.Text("contents", new FileReader(f)));
    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
    writer.addDocument(doc);
    ===================================================

    seid m
    --
    "RABI ZIDNI ILMA"

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedFeb 19, '09 at 3:41p
activeFeb 21, '09 at 9:54a
posts7
users4
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase