title: ravendb remove multiple versions of the same document
body: <p>I have a database with version bundle turned on. So the documents were saved like:
   user/1/revision/1, user/1/revision/2, etc.
  But what I didnt expect is that on search I will have all the versions of the same user or whatever else document I deal with.
  I tried to restore this db to a new database with version bundle turned on and off and I still have all the versions in search.</p>
  
  <p>I make search like this:
  <code>session.Query&lt;Entity&gt;().Search(x=&gt;x.Name, query, options: SearchOptions.And, escapeQueryOptions: EscapeQueryOptions.AllowPostfixWildcard)</code></p>
  
  <p>Not sure, maybe I should use some specific parameters to work with latest document version only?</p>
  
  <p>UPDATE:
  What I did so far:</p>
  
  <ul>
  <li>reinstalled ravendb and installed it as a service(it was as a service, just made sure I didnt break anything)</li>
  <li><p>imported data from old database to new database</p></li>
  <li><p>deleted all the indexes related to the entity</p></li>
  </ul>
  
  <p>I still get all the revisions in my search results. Also my Raven.Server.config doesnt have anything related to bundles. My raven version is 2750 which seem to be the latest production release recommended.</p>
  
  <p>UPDATE 2: When I try to import data to new database from old dump I get the following error:</p>
  
  <p>Client side exception:</p>
  
  <h2>System.Exception: Server Error:</h2>
  
  <p>/bulk_docs
  Raven.Abstractions.Exceptions.OperationVetoedException: PUT vetoed by Raven.Bundles.Versioning.Triggers.VersioningPutTrigger because: Modifying a historical revision is not allowed
     at Raven.Database.DocumentDatabase.AssertPutOperationNotVetoed(String key, RavenJObject metadata, RavenJObject document, TransactionInformation transactionInformation)
     at Raven.Database.DocumentDatabase.&lt;>c_<em>DisplayClass4b.b</em>_43(IStorageActionsAccessor actions)
     at Raven.Storage.Esent.TransactionalStorage.Batch(Action<code>1 action)
     at Raven.Database.DocumentDatabase.Put(String key, Etag etag, RavenJObject document, RavenJObject metadata, TransactionInformation transactionInformation)
     at Raven.Database.Extensions.CommandExtensions.Execute(ICommandData self, DocumentDatabase database, BatchResult batchResult)
     at Raven.Database.DocumentDatabase.ProcessBatch(IList</code>1 commands)
     at Raven.Database.DocumentDatabase.&lt;>c_<em>DisplayClass10c.b</em>_108(IStorageActionsAccessor actions)
     at Raven.Storage.Esent.TransactionalStorage.ExecuteBatch(Action<code>1 action, EsentTransactionContext transactionContext)
     at Raven.Storage.Esent.TransactionalStorage.Batch(Action</code>1 action)
     at Raven.Database.DocumentDatabase.Batch(IList`1 commands)
     at Raven.Database.Server.Responders.DocumentBatch.Batch(IHttpContext context)
     at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx)</p>
  
  <h2>   at Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx)</h2>
  
  <p>Any ideas how to fix it?</p>