Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
MatchInformation.cs
1
using
System;
2
using
System.Text;
3
4
namespace
Waher.Persistence.FullTextSearch.Orders
5
{
9
public
class
MatchInformation
10
{
11
private
DateTime timestamp = DateTime.MinValue;
12
private
uint nrDistinctTokens = 0;
13
private
ulong nrTokens = 0;
14
private
ulong objectReference = 0;
15
private
bool
first =
true
;
16
20
public
MatchInformation
()
21
{
22
}
23
27
public
uint
NrDistinctTokens
=> this.nrDistinctTokens;
28
32
public
ulong
NrTokens
=> this.nrTokens;
33
37
public
DateTime
Timestamp
=> this.timestamp;
38
42
public
ulong
ObjectReference
=> this.objectReference;
43
48
public
void
AddTokenReference
(
TokenReference
Reference)
49
{
50
if
(this.first)
51
{
52
this.first =
false
;
53
this.timestamp = Reference.
Timestamp
;
54
this.objectReference = Reference.
ObjectReference
;
55
}
56
57
//this.tokenReferences.AddLast(Reference);
58
this.nrDistinctTokens++;
59
this.nrTokens += Reference.
Count
;
60
}
61
63
public
override
string
ToString
()
64
{
65
StringBuilder sb =
new
StringBuilder();
66
67
sb.Append(
"Distinct: "
);
68
sb.Append(this.NrDistinctTokens.ToString());
69
sb.Append(
", Total: "
);
70
sb.Append(this.NrTokens.ToString());
71
sb.Append(
", Timestamp: "
);
72
sb.Append(this.Timestamp.ToString());
73
74
return
sb.ToString();
75
}
76
}
77
}
Waher.Persistence.FullTextSearch.ObjectReference
Contains a reference to an indexed object.
Definition:
ObjectReference.cs:15
Waher.Persistence.FullTextSearch.Orders.MatchInformation
Contains matching information about a document in a search.
Definition:
MatchInformation.cs:10
Waher.Persistence.FullTextSearch.Orders.MatchInformation.MatchInformation
MatchInformation()
Contains matching information about a document in a search.
Definition:
MatchInformation.cs:20
Waher.Persistence.FullTextSearch.Orders.MatchInformation.Timestamp
DateTime Timestamp
Timestamp
Definition:
MatchInformation.cs:37
Waher.Persistence.FullTextSearch.Orders.MatchInformation.AddTokenReference
void AddTokenReference(TokenReference Reference)
Adds a token reference.
Definition:
MatchInformation.cs:48
Waher.Persistence.FullTextSearch.Orders.MatchInformation.NrTokens
ulong NrTokens
Number of tokens found.
Definition:
MatchInformation.cs:32
Waher.Persistence.FullTextSearch.Orders.MatchInformation.ToString
override string ToString()
object.ToString()
Definition:
MatchInformation.cs:63
Waher.Persistence.FullTextSearch.Orders.MatchInformation.NrDistinctTokens
uint NrDistinctTokens
Number of distinct tokens found.
Definition:
MatchInformation.cs:27
Waher.Persistence.FullTextSearch.TokenReference
Contains a reference to a token.
Definition:
TokenReference.cs:10
Waher.Persistence.FullTextSearch.TokenReference.Timestamp
DateTime Timestamp
Timestamps when corresponding object refernce was indexed.
Definition:
TokenReference.cs:41
Waher.Persistence.FullTextSearch.TokenReference.Count
uint Count
Token count
Definition:
TokenReference.cs:36
Waher.Persistence.FullTextSearch.TokenReference.ObjectReference
ulong ObjectReference
Reference to the object containing the token.
Definition:
TokenReference.cs:31
Waher.Persistence.FullTextSearch.Orders
Definition:
MatchInformation.cs:5
IoTGateway
Persistence
Waher.Persistence.FullTextSearch
Orders
MatchInformation.cs
Generated by
1.9.5