Renaming Indexes?

115 views
Skip to first unread message

Juma

unread,
Aug 14, 2012, 8:40:11 PM8/14/12
to rav...@googlegroups.com
Hi,

Is there a way to rename an index?

Here is what I am trying to do in short with a document collection of 2-3 million.

"Index1" has column1 and column2 in the map. There is a change request to add another column to the index but if I change map, its going to rebuild the entire index (Am I even right on this one?).

What I would like to do it create a new index "Index2" with the appropriate columns and when its done, rename it back to "Index1"

Why would I even want to to this?
I don't want any existing client application to have to change their code base to start querying on the new column.

Another possible use case is If I decide to make one of my fields Analyzed or change an Analyzer on an field.I would still want existing clients to be able to use the old index.

Thanks,
Juma









Paul Hinett

unread,
Aug 14, 2012, 8:42:02 PM8/14/12
to rav...@googlegroups.com
I asked the same thing last week, Oren said it can't be done i'm afraid.

I hope it could become possible in the future though, as i have
situations like yours with a large data set too.


On 15 August 2012 01:40:11, Juma wrote:
> Hi,
>
> Is there a way to rename an index?
>
> Here is what I am trying to do in short with a document collection of
> 2-3 million.
>
> "Index1" has column1 and column2 in the map. There is a change request
> to add another column to the index but if I change map, its going to
> rebuild the entire index (Am I even right on this one?).
>
> What I would like to do it create a new index "Index2" with the
> appropriate columns and when its done, rename it back to "Index1"
>
> *Why would I even want to to this?*

Juma

unread,
Aug 14, 2012, 8:47:28 PM8/14/12
to rav...@googlegroups.com
Just to clarify the Client is an UI application where I am exposing the fields to query based on the metadata for the UI. Basically, I would change my metadata to start exposing the field for search without recompiling the code. This would work because, I am using the Advanced Lucene query to dynamically build Lucene search/query strings.

Kijana Woodard

unread,
Aug 14, 2012, 9:00:28 PM8/14/12
to rav...@googlegroups.com

And users are able to add new fields which need to be indexed?

Juma

unread,
Aug 14, 2012, 9:17:47 PM8/14/12
to rav...@googlegroups.com
Nope, the users wouldn't add new fields to the index.

It would be a power user or a developer changing the index definition directly using Raven Studio (after testing it). They would also change the meta data definition that allows searching by the new field.

Then the next time the end user uses the Search UI, the new field will be available for searching (fully indexed).

Thanks,
Juma

Oren Eini (Ayende Rahien)

unread,
Aug 15, 2012, 2:59:50 AM8/15/12
to rav...@googlegroups.com
Juma,
We have no facility for renaming indexes.

Juma

unread,
Aug 15, 2012, 10:57:50 AM8/15/12
to rav...@googlegroups.com
Thanks Oren.

Just a quick clarification question (probably newbie):

Since the client code has to explicitly use the index name, I would think as long as there is no structural change in the index, this would be a non-issue right? Is there a underlying technical challenge involved?

Thanks,
Juma

Oren Eini (Ayende Rahien)

unread,
Aug 15, 2012, 11:46:33 AM8/15/12
to rav...@googlegroups.com
Juma,
Indexes are fairly involved internally.
Renaming them isn't as simple as just changing the name, it would means moving directories (while indexing is still running), updating lot of internal values, etc.

Juma

unread,
Aug 15, 2012, 12:53:16 PM8/15/12
to rav...@googlegroups.com
I figured as much. Just wanted to hear it from the horse's mouth. :-)

Thanks,
Juma
Reply all
Reply to author
Forward
0 new messages