Giter Site home page Giter Site logo

nightowl888 / bobobrowse.net Goto Github PK

View Code? Open in Web Editor NEW
40.0 40.0 14.0 4.45 MB

BoboBrowse.Net is a faceted browse engine implemented on a top of Lucene.Net. Originally ported from wonderful Java library developed by John Wang (http://javasoze.github.com/bobo/). While Lucene.Net is good with unstructured data, BoboBrowse.Net fills in the missing piece to handle semi-structured and structured data.

License: Other

PowerShell 2.25% C# 95.73% CSS 0.06% ASP 0.01% JavaScript 1.72% Batchfile 0.13% HTML 0.11%

bobobrowse.net's People

Contributors

nightowl888 avatar zhengchun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bobobrowse.net's Issues

RangeStringFormatter

@NightOwl888
I am testing the RangeStringFormatter class, but it is not perfectly clear to me how to use it for different data type like string, int, or double.
For example, I made this test for strings, but the result is not as expected.
Could you provide me some examples?

[TestMethod]
public void CustomRangeStringFormattingTest()
{
    //  Index.
    string indexPath = @"c:\temp\CustomRangeStringFormattingTest";
    {
        using (Lucene.Net.Store.Directory directory = FSDirectory.Open(new System.IO.DirectoryInfo(indexPath)))
        {
            string category;
            using (IndexWriter modifier = new IndexWriter(directory, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30), true, Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED))
            {
                {
                    category = "red";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "red";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "red";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "red";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "blue";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "blue";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "blue";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "yellow";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "green";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    category = "green";
                    Document doc = new Document();
                    doc.Add(new Field("category", category, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }
            }
        }
    }

    // Field.
    string field = "category";

    // Facet.
    IFacetHandler categoryFacetHandler = new RangeFacetHandler(field, new List<string> { "[blue TO green]", "[red TO yellow]" });

    ICollection<IFacetHandler> handlerList = new IFacetHandler[] {  
        categoryFacetHandler};

    using (Lucene.Net.Store.Directory idx = FSDirectory.Open(new System.IO.DirectoryInfo(indexPath)))
    {
        using (IndexReader reader = IndexReader.Open(idx, true))
        {
            using (BoboIndexReader boboReader = BoboIndexReader.GetInstance(reader, handlerList))
            {
                // Request.
                BrowseRequest browseRequest = new BrowseRequest();
                browseRequest.Count = 10;
                browseRequest.Offset = 0;
                browseRequest.FetchStoredFields = true;
                browseRequest.Query = new MatchAllDocsQuery();

                // Selection. 
                BrowseSelection sel = new BrowseSelection(field);
                browseRequest.AddSelection(sel);

                // FacetSpec.
                FacetSpec spec = new FacetSpec();
                spec.OrderBy = FacetSpec.FacetSortSpec.OrderValueAsc;
                spec.MaxCount = 10;
                browseRequest.SetFacetSpec(field, spec);

                // Browse.
                IBrowsable browser = new BoboBrowser(boboReader);
                BrowseResult result = browser.Browse(browseRequest);

                // Results.
                int totalHits = result.NumHits;
                BrowseHit[] hits = result.Hits;
                IDictionary<string, IFacetAccessible> facetMap = result.FacetMap;
                IFacetAccessible facets = facetMap[field];

                // Create a range string formatterly.
                RangeStringFormatter<string> formatter = new RangeStringFormatter<string>("[{0} TO {1}]", " [{0} ->", " {1}]");

                BrowseFacet[] facetVals = facets.GetFacets().ToArray();

                // Check.
                Assert.AreEqual(2, facetVals.Count());

                string formattedForDisplay1 = formatter.Format(facetVals[0].Value);
                string formattedForDisplay2 = formatter.Format(facetVals[1].Value);

                Assert.AreEqual(new BrowseFacet("[blue -> green]", 5), formattedForDisplay1);
                Assert.AreEqual(new BrowseFacet("[red -> yellow]", 5), formattedForDisplay2);
            }
        }
    }
}

BrowseFacet for ranges

@NightOwl888
Hi, I do not understand why BrowseFacet has not a specialized version for ranges that replaces

public virtual string Value { get; set; }

with

public virtual string UpperBoundValue{ get; set; }
public virtual string LowerBoundValue{ get; set; }

It would be much easier to manage the formatting problem with this solution. Moreover, it seems to me that to compose the range string values (e.g. [a TO b]) is quite time consuming.
Do you agree?

System.ArgumentOutOfRangeException

Hi @NightOwl888,
I have an exception that pops out when I get factes. Could you check the code?

System.ArgumentOutOfRangeException: Argument is out of range.
  Parameter name: index
   in System.Collections.Generic.List`1.get_Item(Int32 index)
   in BoboBrowse.Net.Facets.Impl.CombinedFacetIterator.Format(Object val)
   in BoboBrowse.Net.Facets.Impl.CombinedFacetIterator.Format(Object val)
   in BoboBrowse.Net.Facets.Impl.CombinedFacetIterator.Next(Int32 minHits)
   in BoboBrowse.Net.Facets.CombinedFacetAccessible.GetFacets() 

Facet Query

Following the example here, I found that writing a query with the standard Lucene API and Bobo does not produce exactly the same result.
In particular the score produced by the Lucene query is normalized, while the one produced by the Bobo query is not. Why?
Here a test for you.

[TestMethod]
public void FacetQueryTest()
{
    // Create index.
    string indexPath = @"c:\temp\FacetQueryTest";
    {
        using (Lucene.Net.Store.Directory directory = FSDirectory.Open(new System.IO.DirectoryInfo(indexPath)))
        {
            int number;
            using (IndexWriter modifier = new IndexWriter(directory, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30), true, Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED))
            {
                {
                    number = 1;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));

                    modifier.AddDocument(doc);
                }

                {
                    number = 2;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 3;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 4;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 5;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 6;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 7;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 8;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 9;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }

                {
                    number = 10;
                    string numberFormatted = number.ToString("00", System.Globalization.CultureInfo.InvariantCulture);
                    Document doc = new Document();
                    doc.Add(new Field("number", numberFormatted, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    modifier.AddDocument(doc);
                }
            }
        }
    }

    // Field.
    string field = "number";

    // Facet.
    IFacetHandler numberFacetHandler = new SimpleFacetHandler(field);

    ICollection<IFacetHandler> handlerList = new IFacetHandler[] {  
        numberFacetHandler};

    // Lucene index.
    using (Lucene.Net.Store.Directory idx = FSDirectory.Open(new System.IO.DirectoryInfo(indexPath)))
    {
        using (IndexReader reader = IndexReader.Open(idx, true))
        {
            // Bobo reader.
            using (BoboIndexReader boboReader = BoboIndexReader.GetInstance(reader, handlerList))
            {
                string v1 = "01", v2 = "05", v3 = "09";
                float b1 = 1.1f, b2 = 0.9f, b3 = 1.0f;
                int totalHits, totalHits2;
                BrowseResult result, result2;

                // Bobo.
                {
                    BrowseRequest browseRequest = new BrowseRequest();
                    browseRequest.Count = 10;
                    browseRequest.Offset = 0;
                    browseRequest.FetchStoredFields = true;

                    BrowseSelection sel = new BrowseSelection(field);
                    sel.Values = new string[] { v1, v2, v3 };
                    browseRequest.AddSelection(sel);

                    Dictionary<string, float> boostMap = new Dictionary<string, float>();
                    boostMap.Add(v1, b1);
                    boostMap.Add(v2, b2);
                    boostMap.Add(v3, b3);

                    FacetTermQuery resultQ = new FacetTermQuery(sel, boostMap);
                    browseRequest.Query = resultQ;

                    FacetSpec spec = new FacetSpec();
                    spec.MaxCount = 10;
                    browseRequest.SetFacetSpec(field, spec);

                    IBrowsable browser = new BoboBrowser(boboReader);
                    result = browser.Browse(browseRequest);

                    totalHits = result.NumHits;
                }

                // Lucene.
                {
                    BrowseRequest browseRequest = new BrowseRequest();
                    browseRequest.Count = 10;
                    browseRequest.Offset = 0;
                    browseRequest.FetchStoredFields = true;

                    BooleanQuery resultQ = new BooleanQuery();

                    TermQuery tq = new TermQuery(new Term(field, v1));
                    tq.Boost = b1;
                    resultQ.Add(tq, Occur.SHOULD);

                    tq = new TermQuery(new Term(field, v2));
                    tq.Boost = b2;
                    resultQ.Add(tq, Occur.SHOULD);

                    tq = new TermQuery(new Term(field, v3));
                    tq.Boost = b3;
                    resultQ.Add(tq, Occur.SHOULD);

                    browseRequest.Query = resultQ;

                    IBrowsable browser = new BoboBrowser(boboReader);
                    result2 = browser.Browse(browseRequest);

                    totalHits2 = result.NumHits;
                }


                // Check.
                Assert.AreEqual(totalHits, totalHits2);
                Assert.AreEqual(result.ToString(), result2.ToString());
            }
        }
    }
}

Custom Facet Sort

From the java documentation I found that to obtain custom facet sort it is necessary to implement the interface ComparatorFactory. Which is the corresponding class id BoboBrowse.Net?

FacetSpec.Prefix

Hi all, FacetSpec.Prefix has been removed from the 3.2.0. So, it is impossible to write something like that:

FacetSpec spec = new FacetSpec();
spec.Prefix = "xxx"; 

Is that correct?

NullReferenceException in GetFacets

@NightOwl888
Probably I found a bug in BoboBrowse.Net.Facets.CombinedFacetAccessible.GetFacets(). It gives me back a System.NullReferenceException extracting the collection of BrowseFacet for this handler:

BoboBrowse.Net.Facets.Impl.RangeFacetHandler(name, new BoboBrowse.Net.Facets.Data.PredefinedTermListFactory<int>(), values);

where values is composed as follows:

"[0000000000 TO 0000001000]"    
"[0000001000 TO 0000010000]"    
"[0000010000 TO 0000100000]"    
"[0000100000 TO 0001000000]"    
"[0001000000 TO *]" 

Could you please check?
Thanks.

Create a version without dependency on DLR to support Xamarin clients

Hi!

We want to create an offline search experience in a Xamarin based app on Android and iOS.
As we know, Lucene core runs on Xamarin without a problem.
However, the DLR (System.Dynamic.Runtime) is not supported on Xamarin iOS.
So I was wondering how important the DLR is for BoboBrowse.Net (System.Dynamic.Runtime).
Are there any chances we could get rid of this?

As far as I could see, the dynamic keyword is only used in LibLog.cs
Also, after experimentally removing the package reference to System.Dynamic.Runtime, the project BoboBrowser.Net still build without errors.

Problem with Common.Logging

@NightOwl888
Hi, I found that the Common.Logging >= 1.2 dependence written into the NuGet package of Bobo is not valid. In fact I use Common.Logging 3.0.0 in my solution and it does not work correctly.
It returns the following runtime error:

System.MissingMethodException
HResult=-2146233069
Message=Method not found: 'Common.Logging.ILog Common.Logging.LogManager.GetLogger(System.Type)'
Source=BoboBrowse.Net
StackTrace: in BoboBrowse.Net.Facets.Impl.SimpleFacetHandler..cctor()
InnerException: 

Usage of RangeFacetHandler and TermListFactory

@NightOwl888
Could you show me an example of the usage RangeFacetHandler that exploits the following constructor?

public RangeFacetHandler(string name, TermListFactory termListFactory, IEnumerable<string> predefinedRanges);

Is TermListFactory still necessary? Since BoboBrowse.Net 3.2.0 accepts only strings I am not able to get advantage of a custom TermListFactory.

Does bobobrowse cache the search result in anyway?

In my case, I have a Lucene Index that updated frequently, but sometimes the change is not reflected in BoboBrowse search result. I realized from LuceneNet itself, it's required to reopen the IndexReader after updating your index, but in my case, I always open the IndexReader before using the BoboBrowse.
image
Any helps or confirmations regarding this will be very helpful.

Thanks!

Nested Facet

Does Bobobrowse support Nested Facets? I would like to use it with Make and Model of cars.

Search numbers and dates

Hi, it is clear that BoboBrowse.Net works only with strings, but how can you deal with this limitation during a search of numbers and dates?
I try to make a clear example.
Suppose to index a field such as

int number = 19;
string numberFormatted = number.ToString("000000", System.Globalization.CultureInfo.InvariantCulture);
Field f = new Field("number", numberFormatted, Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS);
f.OmitTermFreqAndPositions = true;
doc.Add(f); 

using a standard analyzer (which is the best choice to analyze a number as text) into the index writer

IndexWriter modifier = new IndexWriter(directory, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30), true, Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED);

Now, you would like to retrieve the indexed value (19). You can do that only writing a (lucene) query like fileld='number' text='000019', which assume that the user knows in advance the correct format for the field number. In fact, if you write fileld='number' text='19' (which is much more intuitive) it returns no results. Thus, the only option you have is to format the user query as done for the indexed value. Is that right?
I ask you that because I am used to build Lucene queries exploiting MultiFieldQueryParser that cannot be used if you format the input number or dates before indexing.

Building the SearchIndex

Hi @NightOwl888
I'm working on a bobo implementation, but I'm having some big issues with getting any results from the index I created using Lucene.Net. I can't find any good examples on how bobo expects the documents to be structured. Do you have a default way or an example of how to create the indexes?

BoboBrowse Custom Sort Field

I'm implementing a custom sort for a field in CreateBrowseRequest, however the sort for this field is ignored. I checked the log and it returns

2021-06-18 16:27:48,919 [P22572/D2/T56] WARN BoboBrowse.Search.LuceneSortDocComparatorFactory - __customSortField: no factory specified, ignored.

Can anyone please advise me what it meant by "no factory specified"?

I've already created a new class (CustomSortComparatorSource) and extended FieldComparatorSource (and within the same class, I had to override the NewComparator). Then in the CreateBrowseRequest, I used AddSortField(new SortField("__customSortField", new CustomSortComparatorSource()))
Am I on the right track for creating a new custom sort for BoboBrowse? If not, how do I go about it? Thanks

No need for cache warm-up for the system to perform

Hi @NightOwl888, I saw that "no need for cache warm-up for the system to perform" is one of the main features of the original BoboBrowse (http://senseidb.github.io/bobo/). Testing BoboBrowse.Net this seems to be not true. This is probably due to the features that this porting does not implement such as CollectDocIdCache and Util.MemoryManager. Is that correct? Can you do something about that? Have you any advice for me?

Search time complexity with BoboBrowse.Net

@NightOwl888
Hi, could you please tell me which is the search time complexity using BoboBrowse.Net?
From what I have observed, the time complexity grows linearly with the number of facet handlers and it does not depend on the index dimension (i.e., the number of documents). Is that right?
Do you know if the number of facet values or the type of handles can condition the complexity?

BoboIndexReader and IndexReader: can Bobo be used for simple text search, just like IndexReader?

I'm only starting to test BoboBrowse.Net, and would like to use it with minimum code changes to my existing Lucene.net code.
So, I have 2 questions:

  1. Can BoboBrowse.Net can be used to search for multi fields search as I use currently? that is, category:shoes color:white price:[100 to 150] kind of way.
  2. Assuming the answer for my first question is YES, I would like to hear from some experienced users: should expect overhead (in terms of search time) if I use Bobo vs. plain old Lucene?

Facet selection and ValueOperationAnd

I'm using some old version of bobo browse (I cannot tell what is the version since this is included in my solution for a long time),
I setting ValueOperationAnd on some facet and also there is ExpandSelection set to true. When selection are made counts on facets are not chaning.
So for example I've got facet Color. There is AND between selection first when I'm selecting Green I thought that number on other values will decrease depending on selection but this is not happening. Is this is a known issue with AND operator between selection?

If this is working as expected is there a workaround to have got propper numbers next to facet values ?
Thanks for helping

TermValueListFactory<T>

The documentation shows the usage of TermValueListFactory<T>. Apparently, this generic class does not exist, so which is the right class to implement the examples of the Range Strings section?
I tried to use the PredefinedTermListFactory<T>, but it does not work as you wrote.
Could you show me an actual example to manage string ranges?
Thanks.

3.2.0 stability

Hi all, which is the stability of this porting of Bobo? Do you plan to release the 3.2.0?

How to get count of intersecting facet values?

I have one requirement in that I have column called "party". Assume that in party there can be buyers and sellers. I have option to select multiple facet values. So there will be list of parties (i.e. buyers and sellers). There will be some transactions between seller and buyer. The transactions will be displayed if selected value is either buyer or seller. There is no requirement to display the transaction between parties but it is on individual level. Now assume there is total 2 transactions. One is between X and Y and another is between X and Z (another buyer). So initially the facet will look like this.

Parties

  • X (2)
  • Y (1)
  • Z (1)

Here the count displays the correct value. Now when I select X it will display the transaction for X. That will be two. But the count of other parties that did transaction with X is displaying wrong.

Expected count

Parties

  • X (2)
  • Y (0)
  • Z (0)

Actual count

Parties

  • X (2)
  • Y (1)
  • Z (1)

For above case user will think that there is some other transaction which is between Y and another party apart from X and Z but actually there is no such transaction. So how to update the count based on intersection of data or say overlapping of data?

Trouble with IFacetHandler.GetFieldValue

@NightOwl888
I found some problems with the method IFacetHandler.GetFieldValue.
Could you check the following test method?

[TestMethod]
public void Test()
{
    Stopwatch stopWatch = new Stopwatch();

    // Create index.
    string indexPath = @"c:\temp\test";
    int numDocs = 10;
    using (Lucene.Net.Store.Directory directory = FSDirectory.Open(new System.IO.DirectoryInfo(indexPath)))
    {
        string text;
        using (IndexWriter modifier = new IndexWriter(directory, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30), true, Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED))
        {
            for (int i = 0; i < numDocs; i++)
            {
                text = "asisdfowefposjverovn";
                Document doc = new Document();
                doc.Add(new Field("text", text, Field.Store.YES, Field.Index.ANALYZED));
                modifier.AddDocument(doc);
            }
        }
    }

    // Facets.
    IFacetHandler textFacetHandler = new SimpleFacetHandler("text");
    ICollection<IFacetHandler> handlerList = new IFacetHandler[] { textFacetHandler };

    // Open index.
    using (Lucene.Net.Store.Directory idx = FSDirectory.Open(new System.IO.DirectoryInfo(indexPath)))
    {
        using (IndexReader reader = IndexReader.Open(idx, true))
        {
            // Open bobo reader.
            using (BoboIndexReader boboReader = BoboIndexReader.GetInstance(reader, handlerList))
            {
                // Extract text.
                int n = reader.NumDocs();
                for (int i = 0; i < n; i++)
                {
                    string field = textFacetHandler.GetFieldValue(boboReader, i);
                    Assert.IsFalse(string.IsNullOrEmpty(field));
                }
            }
        }
    }
}

It generates the following error while it retrives the field value System.IndexOutOfRangeException crossed a native/managed boundary.

Project status

Alpha - awaiting port of StandardAnalyzer and QueryParser of Lucene.Net 4.8.0, as well as releases for .NET 3.5 and 4.0.

I think StandardAnalyzer and QueryParser of Lucene.Net 4.8.0 are fine now in the latest 4.8 beta package. This might be alpha, but probably not for that reason

BoboBrowser.Browse method exception

Executing this test, I get back the following error from BoboBrowser.Browse method:

BoboBrowse.Net.BrowseException was unhandled
  HResult=-2146233088
  Message=Length cannot be less or equal than 0.
Nome parametro: length
  Source=BoboBrowse.Net
  StackTrace:
       in BoboBrowse.Net.BoboSubBrowser.Browse(BrowseRequest req, Weight weight, Collector collector, IDictionary`2 facetMap, Int32 start)
       in BoboBrowse.Net.MultiBoboBrowser.Browse(BrowseRequest req, Weight weight, Collector hitCollector, IDictionary`2 facetMap, Int32 start)
       in BoboBrowse.Net.MultiBoboBrowser.Browse(BrowseRequest req, Collector hitCollector, IDictionary`2 facetMap, Int32 start)
       in BoboBrowse.Net.MultiBoboBrowser.Browse(BrowseRequest req, Collector hitCollector, IDictionary`2 facetMap)
       in BoboBrowse.Net.MultiBoboBrowser.Browse(BrowseRequest req)
       in ResultNumberTest.Program.CategoryFacetNavigation(Type facetHandlerType) in D:\TEMP\ResultNumberTest\ResultNumberTest\ResultNumberTest\Program.cs:riga 90
       in ResultNumberTest.Program.Main(String[] args) in D:\TEMP\ResultNumberTest\ResultNumberTest\ResultNumberTest\Program.cs:riga 32
       in System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       in System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.ArgumentOutOfRangeException
       HResult=-2146233086
       Message=Length cannot be less or equal than 0.
Nome parametro: length
       Source=mscorlib
       ParamName=length
       StackTrace:
            in System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
            in BoboBrowse.Net.Facets.Filter.FacetRangeFilter.GetRangeStrings(String rangeString)
            in BoboBrowse.Net.Facets.Filter.FacetRangeFilter.Parse(FacetDataCache dataCache, String rangeString)
            in BoboBrowse.Net.Facets.Filter.FacetRangeFilter.ConvertIndexes(FacetDataCache dataCache, String[] vals)
            in BoboBrowse.Net.Facets.Filter.FacetRangeFilter.FacetRangeValueConverter.Convert(FacetDataCache dataCache, String[] vals)
            in BoboBrowse.Net.Facets.Range.ValueConverterBitSetBuilder.BitSet(FacetDataCache dataCache)
            in BoboBrowse.Net.Facets.Filter.BitSetFilter.GetBitSet(FacetDataCache dataCache)
            in BoboBrowse.Net.Facets.Filter.BitSetFilter.GetRandomAccessDocIdSet(BoboIndexReader reader)
            in BoboBrowse.Net.Facets.Filter.RandomAccessAndFilter.GetRandomAccessDocIdSet(BoboIndexReader reader)
            in BoboBrowse.Net.Facets.Filter.RandomAccessFilter.GetDocIdSet(IndexReader reader)
            in BoboBrowse.Net.Search.BoboSearcher2.Search(Weight weight, Filter filter, Collector collector, Int32 start, IBoboMapFunctionWrapper mapReduceWrapper)
            in BoboBrowse.Net.BoboSubBrowser.Browse(BrowseRequest req, Weight weight, Collector collector, IDictionary`2 facetMap, Int32 start)
       InnerException: 

This exception pops out only when RangeFacetHandler is used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.