Comments (10)
Hi @KresoJ
What version of RavenDB did you test it on? We released version 6.0.102 today which contains some fixes in similar area in Corax. Could you check it?
from ravendb.
Thank you @arekpalinski, we are on 6.0.101 now. I will upgrade later today and try.
from ravendb.
Unfortunately, the issue is still there.
from ravendb.
Ok. Do you think you could narrow it down to a failing test - https://ravendb.net/docs/article-page/6.0/csharp/start/test-driver?
from ravendb.
Sure, will do that. Probably not before Thursday.
from ravendb.
`using System;
using Raven.Client.Documents.Indexes;
using System.Linq;
using Raven.TestDriver;
using Xunit;
using Raven.Client.Documents;
namespace Fields.Tests.RavenDB
{
public class CoraxMultipleOrderBy : RavenTestDriver
{
[Fact]
public void CoraxMultipleOrder_SearchEngine_Test()
{
var store = GetDocumentStore();
store.ExecuteIndex(new OrderByIndexLucene());
store.ExecuteIndex(new OrderByIndexCorax());
using (var session = store.OpenSession())
{
for (int i = 0; i < 100; i++)
{
session.Store(new TestDocument
{
Name = "Name_" + i.ToString(),
DateCreated = new DateTime(2000, 1, 1).AddDays(i),
Archived = i % 2 == 0
});
}
session.SaveChanges();
}
WaitForIndexing(store);
using (var session = store.OpenSession())
{
var luceneDocs = session.Query<TestDocument, OrderByIndexLucene>()
.OrderBy(x => x.Archived).ThenByDescending(x => x.DateCreated).Skip(10).Take(10)
.ToList();
var coraxDocs = session.Query<TestDocument, OrderByIndexCorax>()
.OrderBy(x => x.Archived).ThenByDescending(x => x.DateCreated).Skip(10).Take(10)
.ToList();
Assert.Equal(luceneDocs, coraxDocs);
}
}
private class OrderByIndexLucene : AbstractIndexCreationTask<TestDocument>
{
public OrderByIndexLucene()
{
SearchEngineType = Raven.Client.Documents.Indexes.SearchEngineType.Lucene;
Map = entities => from entity in entities
select new
{
entity.Id,
entity.Name,
entity.Archived,
entity.DateCreated
};
}
}
private class OrderByIndexCorax : AbstractIndexCreationTask<TestDocument>
{
public OrderByIndexCorax()
{
SearchEngineType = Raven.Client.Documents.Indexes.SearchEngineType.Corax;
Map = entities => from entity in entities
select new
{
entity.Id,
entity.Name,
entity.Archived,
entity.DateCreated
};
}
}
public class TestDocument
{
public string Id { get; set; } = null!;
public bool Archived { get; set; }
public DateTime DateCreated { get; set; }
public string Name { get; set; } = null!;
}
}
}`
from ravendb.
`using System;
using Raven.Client.Documents.Indexes;
using System.Linq;
using Raven.TestDriver;
using Xunit;
using Raven.Client.Documents;
namespace Fields.Tests.RavenDB
{
public class CoraxMultipleOrderByDuplicates : RavenTestDriver
{
[Fact]
public void CoraxMultipleOrder_SearchEngine_Test2()
{
var store = GetDocumentStore();
store.ExecuteIndex(new OrderByIndexCorax());
using (var session = store.OpenSession())
{
for (int i = 0; i < 100; i++)
{
session.Store(new TestDocument
{
Name = "Name_" + i.ToString(),
DateCreated = new DateTime(2000, 1, 1).AddDays(i),
Archived = i % 2 == 0
});
}
session.SaveChanges();
}
WaitForIndexing(store);
using (var session = store.OpenSession())
{
var page1 = session.Query<TestDocument, OrderByIndexCorax>()
.OrderBy(x => x.Archived).ThenByDescending(x => x.DateCreated).Skip(0).Take(10)
.ToList();
var page2 = session.Query<TestDocument, OrderByIndexCorax>()
.OrderBy(x => x.Archived).ThenByDescending(x => x.DateCreated).Skip(10).Take(10)
.ToList();
Assert.NotEqual(page1.First().Id, page2.First().Id);
}
}
private class OrderByIndexCorax : AbstractIndexCreationTask<TestDocument>
{
public OrderByIndexCorax()
{
SearchEngineType = Raven.Client.Documents.Indexes.SearchEngineType.Corax;
Map = entities => from entity in entities
select new
{
entity.Id,
entity.Name,
entity.Archived,
entity.DateCreated
};
}
}
public class TestDocument
{
public string Id { get; set; } = null!;
public bool Archived { get; set; }
public DateTime DateCreated { get; set; }
public string Name { get; set; } = null!;
}
}
}`
from ravendb.
Hi @arekpalinski,
the first test compares lucene and corax for the same data, and the second one detects the same document on different pages with corax engine.
from ravendb.
Related Issues (20)
- Where to find RVN for MacOS? Or how to generate a proper Helm file? HOT 2
- Helm installation failed HOT 1
- Object reference not set to an instance of an object HOT 5
- Auto index and query by child object properties produces unexpected result HOT 1
- Backup Restore ends in Exception HOT 6
- Unable to load document without ChangeVector in a cluster transaction session HOT 1
- Dictionary Collection Values Being Altered After Patch Operation HOT 1
- Corax indexing error: Got an invalid container id: -1 HOT 6
- InvalidQueryException HOT 5
- Querying index on nested properties returns no results 6.0.100 HOT 15
- 6.0.100 (Corax) Killed by OOM, "corrupted" 50% of databases HOT 27
- JsonConverter is ignored when used within "In()" query HOT 2
- Request for SMB Mount Support in Azure Container Apps for Volume Persistence HOT 3
- Can't delete DB on arm64v8 Docker image HOT 4
- Remove polyfill packages for newer TFM
- Feature idea: Studio persisted custom columns HOT 3
- Default SearchEngineType HOT 2
- Invalid query translation (where/search combination) HOT 4
- Unable to patch dictionary with a property HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ravendb.