Method NewAnonymous
NewAnonymous(Func<DocIdSetIterator>)
Creates a new instance with the ability to specify the body of the GetIterator()
method through the getIterator
parameter.
Simple example:
var docIdSet = DocIdSet.NewAnonymous(getIterator: () =>
{
OpenBitSet bitset = new OpenBitSet(5);
bitset.Set(0, 5);
return new DocIdBitSet(bitset);
});
LUCENENET specific
Declaration
public static DocIdSet NewAnonymous(Func<DocIdSetIterator> getIterator)
Parameters
Type | Name | Description |
---|---|---|
Func<DocIdSetIterator> | getIterator | A delegate method that represents (is called by) the GetIterator() method. It returns the DocIdSetIterator for this DocIdSet. |
Returns
Type | Description |
---|---|
DocIdSet | A new Lucene.Net.Search.DocIdSet.AnonymousDocIdSet instance. |
NewAnonymous(Func<DocIdSetIterator>, Func<IBits>)
Creates a new instance with the ability to specify the body of the GetIterator()
method through the getIterator
parameter and the body of the Bits
property through the bits
parameter.
Simple example:
var docIdSet = DocIdSet.NewAnonymous(getIterator: () =>
{
OpenBitSet bitset = new OpenBitSet(5);
bitset.Set(0, 5);
return new DocIdBitSet(bitset);
}, bits: () =>
{
return bits;
});
LUCENENET specific
Declaration
public static DocIdSet NewAnonymous(Func<DocIdSetIterator> getIterator, Func<IBits> bits)
Parameters
Type | Name | Description |
---|---|---|
Func<DocIdSetIterator> | getIterator | A delegate method that represents (is called by) the GetIterator() method. It returns the DocIdSetIterator for this DocIdSet. |
Func<IBits> | bits | A delegate method that represents (is called by) the Bits property. It returns the IBits instance for this DocIdSet. |
Returns
Type | Description |
---|---|
DocIdSet | A new Lucene.Net.Search.DocIdSet.AnonymousDocIdSet instance. |
NewAnonymous(Func<DocIdSetIterator>, Func<Boolean>)
Creates a new instance with the ability to specify the body of the GetIterator()
method through the getIterator
parameter and the body of the IsCacheable
property through the isCacheable
parameter.
Simple example:
var docIdSet = DocIdSet.NewAnonymous(getIterator: () =>
{
OpenBitSet bitset = new OpenBitSet(5);
bitset.Set(0, 5);
return new DocIdBitSet(bitset);
}, isCacheable: () =>
{
return true;
});
LUCENENET specific
Declaration
public static DocIdSet NewAnonymous(Func<DocIdSetIterator> getIterator, Func<bool> isCacheable)
Parameters
Type | Name | Description |
---|---|---|
Func<DocIdSetIterator> | getIterator | A delegate method that represents (is called by) the GetIterator() method. It returns the DocIdSetIterator for this DocIdSet. |
Func<System.Boolean> | isCacheable | A delegate method that represents (is called by) the IsCacheable
property. It returns a |
Returns
Type | Description |
---|---|
DocIdSet | A new Lucene.Net.Search.DocIdSet.AnonymousDocIdSet instance. |
NewAnonymous(Func<DocIdSetIterator>, Func<IBits>, Func<Boolean>)
Creates a new instance with the ability to specify the body of the GetIterator()
method through the getIterator
parameter and the body of the Bits
property through the bits
parameter.
Simple example:
var docIdSet = DocIdSet.NewAnonymous(getIterator: () =>
{
OpenBitSet bitset = new OpenBitSet(5);
bitset.Set(0, 5);
return new DocIdBitSet(bitset);
}, bits: () =>
{
return bits;
}, isCacheable: () =>
{
return true;
});
LUCENENET specific
Declaration
public static DocIdSet NewAnonymous(Func<DocIdSetIterator> getIterator, Func<IBits> bits, Func<bool> isCacheable)
Parameters
Type | Name | Description |
---|---|---|
Func<DocIdSetIterator> | getIterator | A delegate method that represents (is called by) the GetIterator() method. It returns the DocIdSetIterator for this DocIdSet. |
Func<IBits> | bits | A delegate method that represents (is called by) the Bits property. It returns the IBits instance for this DocIdSet. |
Func<System.Boolean> | isCacheable | A delegate method that represents (is called by) the IsCacheable
property. It returns a |
Returns
Type | Description |
---|---|
DocIdSet | A new Lucene.Net.Search.DocIdSet.AnonymousDocIdSet instance. |