You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Enrique Martínez Zuñiga <en...@iteso.mx> on 2008/06/03 18:58:12 UTC

Ambiguous name in text's term class (vb.net)

Hello all,
 
    I'm having trouble in the code below to get the terms' text due to ambiguous name in VB.NET (case insensitive). To avoid this behavior I had to rename all the references of the variable text in term.cs to _text.

    Dim idxReader As IndexReader = IndexReader.Open(strIdxFolder)
    Dim Terms As TermEnum = idxReader.Terms(New Term(strField, ""))
    Dim strTermText As String = Terms.Term().Text

   Can you tell me if there is another way to access this property in VB.NET?
 
Gracias,
 
 
Enrique Martínez Zúñiga
Analista Programador
Sistemas de Información
Biblioteca - ITESO University
http://biblio.iteso.mx
 
 

RE: Ambiguous name in text's term class (vb.net)

Posted by Digy <di...@gmail.com>.
Hi Enrique,

You are right; this is a defect in Lucene.Net and the "text" field  in
"Term.cs" should not be public since the "Text()" function returns its
value.

I don't know any other way unless using reflection.

Can you open an issue in jira?
(https://issues.apache.org/jira/browse/LUCENENET)

DIGY



From: Enrique Martínez Zuñiga [mailto:enrique@iteso.mx] 
Sent: Tuesday, June 03, 2008 7:58 PM
To: lucene-net-user@incubator.apache.org
Subject: Ambiguous name in text's term class (vb.net)

Hello all,
 
    I'm having trouble in the code below to get the terms' text due to
ambiguous name in VB.NET (case insensitive). To avoid this behavior I had to
rename all the references of the variable text in term.cs to _text.
    Dim idxReader As IndexReader = IndexReader.Open(strIdxFolder)
    Dim Terms As TermEnum = idxReader.Terms(New Term(strField, ""))
    Dim strTermText As String = Terms.Term().Text
   Can you tell me if there is another way to access this property in
VB.NET?
 
Gracias,
 
 
Enrique Martínez Zúñiga
Analista Programador
Sistemas de Información
Biblioteca - ITESO University
http://biblio.iteso.mx
 
 


RE: Ambiguous name in text's term class (vb.net)

Posted by Enrique Martínez Zuñiga <en...@iteso.mx>.
Thank you Digy, I've changed "text" to internal and seems to work fine. The issue has been set. 

Best,

Enrique 

-----Original Message-----
From: Digy [mailto:digydigy@gmail.com] 
Sent: Martes, 03 de Junio de 2008 02:40 p.m.
To: lucene-net-user@incubator.apache.org
Subject: RE: Ambiguous name in text's term class (vb.net)

You may be right(since I am not a vb programmer) but libraries like Lucene must be fully usable from both case-sensitive and case-insensitive languages.
So, This case sould be handled by Lucene.Net

DIGY


-----Original Message-----
From: Gautam Lad [mailto:gautam@rogers.com]
Sent: Tuesday, June 03, 2008 10:03 PM
To: lucene-net-user@incubator.apache.org
Subject: Re: Ambiguous name in text's term class (vb.net)

Try putting Square brackets around the variable.
   
  Eg.
   
  Dim strTermText As String = Terms.Term().[Text]

Enrique Martínez Zuñiga <en...@iteso.mx> wrote:
      Hello all,
   
      I'm having trouble in the code below to get the terms' text due to ambiguous name in VB.NET (case insensitive). To avoid this behavior I had to rename all the references of the variable text in term.cs to _text.
      Dim idxReader As IndexReader = IndexReader.Open(strIdxFolder)
    Dim Terms As TermEnum = idxReader.Terms(New Term(strField, ""))
    Dim strTermText As String = Terms.Term().Text
     Can you tell me if there is another way to access this property in VB.NET?
   
  Gracias,
   
   
  Enrique Martínez Zúñiga
    Analista Programador
  Sistemas de Información
  Biblioteca - ITESO University
  http://biblio.iteso.mx
   
   




RE: Ambiguous name in text's term class (vb.net)

Posted by Digy <di...@gmail.com>.
You may be right(since I am not a vb programmer) but libraries like Lucene
must be fully usable from both case-sensitive and case-insensitive
languages.
So, This case sould be handled by Lucene.Net

DIGY


-----Original Message-----
From: Gautam Lad [mailto:gautam@rogers.com] 
Sent: Tuesday, June 03, 2008 10:03 PM
To: lucene-net-user@incubator.apache.org
Subject: Re: Ambiguous name in text's term class (vb.net)

Try putting Square brackets around the variable.
   
  Eg.
   
  Dim strTermText As String = Terms.Term().[Text]

Enrique Martínez Zuñiga <en...@iteso.mx> wrote:
      Hello all,
   
      I'm having trouble in the code below to get the terms' text due to
ambiguous name in VB.NET (case insensitive). To avoid this behavior I had to
rename all the references of the variable text in term.cs to _text.
      Dim idxReader As IndexReader = IndexReader.Open(strIdxFolder)
    Dim Terms As TermEnum = idxReader.Terms(New Term(strField, ""))
    Dim strTermText As String = Terms.Term().Text
     Can you tell me if there is another way to access this property in
VB.NET?
   
  Gracias,
   
   
  Enrique Martínez Zúñiga
    Analista Programador
  Sistemas de Información
  Biblioteca - ITESO University
  http://biblio.iteso.mx
   
   




RE: Ambiguous name in text's term class (vb.net)

Posted by Enrique Martínez Zuñiga <en...@iteso.mx>.
Gracias Gutam, but the problem is still there.


-----Original Message-----
From: Gautam Lad [mailto:gautam@rogers.com] 
Sent: Martes, 03 de Junio de 2008 02:03 p.m.
To: lucene-net-user@incubator.apache.org
Subject: Re: Ambiguous name in text's term class (vb.net)

Try putting Square brackets around the variable.
   
  Eg.
   
  Dim strTermText As String = Terms.Term().[Text]

Enrique Martínez Zuñiga <en...@iteso.mx> wrote:
      Hello all,
   
      I'm having trouble in the code below to get the terms' text due to ambiguous name in VB.NET (case insensitive). To avoid this behavior I had to rename all the references of the variable text in term.cs to _text.
      Dim idxReader As IndexReader = IndexReader.Open(strIdxFolder)
    Dim Terms As TermEnum = idxReader.Terms(New Term(strField, ""))
    Dim strTermText As String = Terms.Term().Text
     Can you tell me if there is another way to access this property in VB.NET?
   
  Gracias,
   
   
  Enrique Martínez Zúñiga
    Analista Programador
  Sistemas de Información
  Biblioteca - ITESO University
  http://biblio.iteso.mx
   
   



Re: Ambiguous name in text's term class (vb.net)

Posted by Gautam Lad <ga...@rogers.com>.
Try putting Square brackets around the variable.
   
  Eg.
   
  Dim strTermText As String = Terms.Term().[Text]

Enrique Martínez Zuñiga <en...@iteso.mx> wrote:
      Hello all,
   
      I'm having trouble in the code below to get the terms' text due to ambiguous name in VB.NET (case insensitive). To avoid this behavior I had to rename all the references of the variable text in term.cs to _text.
      Dim idxReader As IndexReader = IndexReader.Open(strIdxFolder)
    Dim Terms As TermEnum = idxReader.Terms(New Term(strField, ""))
    Dim strTermText As String = Terms.Term().Text
     Can you tell me if there is another way to access this property in VB.NET?
   
  Gracias,
   
   
  Enrique Martínez Zúñiga
    Analista Programador
  Sistemas de Información
  Biblioteca - ITESO University
  http://biblio.iteso.mx