You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Willi Haase <wi...@yahoo.com> on 2012/10/25 15:26:37 UTC

How to use/create an alias to a field?

Hello

I am using Lucene 3.4 and I have nearly the same question like Jan in his post:
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C4791E482.60900%40gmx.de%3E


I could found something helpful in "Lucene in Action" or in the web.
What is the recommended way to create an alias to a field?
I want be able to use in the searchquery "au:some_name" or "auth:some_name" or "author:some_name", all using the field "author".

Many thanks in advance for any help or recommendations
  Willi : )

Re: How to use/create an alias to a field?

Posted by Willi Haase <wi...@yahoo.com>.
hi ian

yes, i read this.
i only wonder, if there are maybe new thoughts or possibilities available since January 2008 ;-)

thank you for your email : )

cheers
   willi


________________________________
 Von: Ian Lea <ia...@gmail.com>
An: java-user@lucene.apache.org; Willi Haase <wi...@yahoo.com> 
Gesendet: 14:50 Donnerstag, 25.Oktober 2012
Betreff: Re: How to use/create an alias to a field?
 
Did you also find the response to that question?
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C81162.81463.qm@web50303.mail.re2.yahoo.com%3E

Hard to think of any other ways than those mentioned there.


--
Ian.


On Thu, Oct 25, 2012 at 2:26 PM, Willi Haase <wi...@yahoo.com> wrote:
> Hello
>
> I am using Lucene 3.4 and I have nearly the same question like Jan in his post:
> http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C4791E482.60900%40gmx.de%3E
>
>
> I could found something helpful in "Lucene in Action" or in the web.
> What is the recommended way to create an alias to a field?
> I want be able to use in the searchquery "au:some_name" or "auth:some_name" or "author:some_name", all using the field "author".
>
> Many thanks in advance for any help or recommendations
>   Willi : )

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

Re: How to use/create an alias to a field?

Posted by Ian Lea <ia...@gmail.com>.
Did you also find the response to that question?
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C81162.81463.qm@web50303.mail.re2.yahoo.com%3E

Hard to think of any other ways than those mentioned there.


--
Ian.


On Thu, Oct 25, 2012 at 2:26 PM, Willi Haase <wi...@yahoo.com> wrote:
> Hello
>
> I am using Lucene 3.4 and I have nearly the same question like Jan in his post:
> http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C4791E482.60900%40gmx.de%3E
>
>
> I could found something helpful in "Lucene in Action" or in the web.
> What is the recommended way to create an alias to a field?
> I want be able to use in the searchquery "au:some_name" or "auth:some_name" or "author:some_name", all using the field "author".
>
> Many thanks in advance for any help or recommendations
>   Willi : )

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


Re: How to use/create an alias to a field?

Posted by Willi Haase <wi...@yahoo.com>.
Hello Jack,

you are right, there is no reason that this possibility is only in Solr, what could use it from the Lucene-API.
I just got the old source code from Jan, the author of the old post.
When our current change is release I will have a look to the Solr solution and I will try to bring this in some way to the Lucene API as well.

Thank you
  Willi


________________________________
 Von: Jack Krupansky <ja...@basetechnology.com>
An: java-user@lucene.apache.org; Willi Haase <wi...@yahoo.com> 
Gesendet: 17:43 Donnerstag, 25.Oktober 2012
Betreff: Re: How to use/create an alias to a field?
 
I almost added that you could create a subclass of the Lucene query parser, as Solr does, and add the aliasing that way. There might/should be field aliasing code in Solr that you could easily apply in Solr. There really isn't a great reason why aliasing is only available in Solr and not in Lucene.

But unless you are prepared to hack on the query parser, alias support isn't available in Lucene right now.

-- Jack Krupansky
-----Original Message----- From: Willi Haase
Sent: Thursday, October 25, 2012 11:59 AM
To: java-user@lucene.apache.org
Subject: Re: How to use/create an alias to a field?

Hi Jack

Thank you for your help.
My problem is, I have only a Lucene setup and can not switch to Solr : (

Cheers
Willi


________________________________
Von: Jack Krupansky <ja...@basetechnology.com>
An: java-user@lucene.apache.org
Gesendet: 15:57 Donnerstag, 25.Oktober 2012
Betreff: Re: How to use/create an alias to a field?

With edismax in Solr 3.6/4.0 field aliases are supported:

"The syntax for aliasing is f.myalias.qf=realfield. A user query for myalias:foo will be queried as realfield:foo."

See:
http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming

-- Jack Krupansky

-----Original Message----- From: Willi Haase
Sent: Thursday, October 25, 2012 9:26 AM
To: java-user@lucene.apache.org
Subject: How to use/create an alias to a field?

Hello

I am using Lucene 3.4 and I have nearly the same question like Jan in his post:
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C4791E482.60900%40gmx.de%3E


I could found something helpful in "Lucene in Action" or in the web.
What is the recommended way to create an alias to a field?
I want be able to use in the searchquery "au:some_name" or "auth:some_name" or "author:some_name", all using the field "author".

Many thanks in advance for any help or recommendations
Willi : )

---------------------------------------------------------------------
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

Re: How to use/create an alias to a field?

Posted by Jack Krupansky <ja...@basetechnology.com>.
I almost added that you could create a subclass of the Lucene query parser, 
as Solr does, and add the aliasing that way. There might/should be field 
aliasing code in Solr that you could easily apply in Solr. There really 
isn't a great reason why aliasing is only available in Solr and not in 
Lucene.

But unless you are prepared to hack on the query parser, alias support isn't 
available in Lucene right now.

-- Jack Krupansky
-----Original Message----- 
From: Willi Haase
Sent: Thursday, October 25, 2012 11:59 AM
To: java-user@lucene.apache.org
Subject: Re: How to use/create an alias to a field?

Hi Jack

Thank you for your help.
My problem is, I have only a Lucene setup and can not switch to Solr : (

Cheers
  Willi


________________________________
Von: Jack Krupansky <ja...@basetechnology.com>
An: java-user@lucene.apache.org
Gesendet: 15:57 Donnerstag, 25.Oktober 2012
Betreff: Re: How to use/create an alias to a field?

With edismax in Solr 3.6/4.0 field aliases are supported:

"The syntax for aliasing is f.myalias.qf=realfield. A user query for 
myalias:foo will be queried as realfield:foo."

See:
http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming

-- Jack Krupansky

-----Original Message----- From: Willi Haase
Sent: Thursday, October 25, 2012 9:26 AM
To: java-user@lucene.apache.org
Subject: How to use/create an alias to a field?

Hello

I am using Lucene 3.4 and I have nearly the same question like Jan in his 
post:
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C4791E482.60900%40gmx.de%3E


I could found something helpful in "Lucene in Action" or in the web.
What is the recommended way to create an alias to a field?
I want be able to use in the searchquery "au:some_name" or "auth:some_name" 
or "author:some_name", all using the field "author".

Many thanks in advance for any help or recommendations
Willi : )

---------------------------------------------------------------------
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


Re: How to use/create an alias to a field?

Posted by Willi Haase <wi...@yahoo.com>.
Hi Jack

Thank you for your help.
My problem is, I have only a Lucene setup and can not switch to Solr : (

Cheers
  Willi 


________________________________
 Von: Jack Krupansky <ja...@basetechnology.com>
An: java-user@lucene.apache.org 
Gesendet: 15:57 Donnerstag, 25.Oktober 2012
Betreff: Re: How to use/create an alias to a field?
 
With edismax in Solr 3.6/4.0 field aliases are supported:

"The syntax for aliasing is f.myalias.qf=realfield. A user query for myalias:foo will be queried as realfield:foo."

See:
http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming

-- Jack Krupansky

-----Original Message----- From: Willi Haase
Sent: Thursday, October 25, 2012 9:26 AM
To: java-user@lucene.apache.org
Subject: How to use/create an alias to a field?

Hello

I am using Lucene 3.4 and I have nearly the same question like Jan in his post:
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C4791E482.60900%40gmx.de%3E


I could found something helpful in "Lucene in Action" or in the web.
What is the recommended way to create an alias to a field?
I want be able to use in the searchquery "au:some_name" or "auth:some_name" or "author:some_name", all using the field "author".

Many thanks in advance for any help or recommendations
Willi : ) 

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

Re: How to use/create an alias to a field?

Posted by Jack Krupansky <ja...@basetechnology.com>.
With edismax in Solr 3.6/4.0 field aliases are supported:

"The syntax for aliasing is f.myalias.qf=realfield. A user query for 
myalias:foo will be queried as realfield:foo."

See:
http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming

-- Jack Krupansky

-----Original Message----- 
From: Willi Haase
Sent: Thursday, October 25, 2012 9:26 AM
To: java-user@lucene.apache.org
Subject: How to use/create an alias to a field?

Hello

I am using Lucene 3.4 and I have nearly the same question like Jan in his 
post:
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3C4791E482.60900%40gmx.de%3E


I could found something helpful in "Lucene in Action" or in the web.
What is the recommended way to create an alias to a field?
I want be able to use in the searchquery "au:some_name" or "auth:some_name" 
or "author:some_name", all using the field "author".

Many thanks in advance for any help or recommendations
  Willi : ) 


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