The Learning To Rank result is treated as an input to a function

2020-03-03 Thread Dawn

Hi all:

How to embed a linear formula calculation in the outer layer of Learning To 
Rank?
We need to do a calculation on the score of Learning To Rank.

For example,normal use of Learning To Rank looks like this,I'm going to get a 
score:

rq={!ltr model=myModel reRankDocs=100}

I want the score evaluated at Learning To Rank to be the input to a 
function,How do I use it?




Where fq, field sort and rerank query, the score of rerank is not correct

2020-03-11 Thread Dawn
GetDocListNC method in the SolrIndexSearcher class, Query is converted to 
BooleanQuery when fq queries are available.

Has a call query instanceof RankQuery below, which will never be true.

The score of rerank is not correct.

Do you need to add a loop to the query type?


ProcessedFilter pf = getProcessedFilter(cmd.getFilter(), cmd.getFilterList());
if (pf.filter != null) {
  query = new BooleanQuery.Builder().add(query, Occur.MUST).add(pf.filter, 
Occur.FILTER).build();
}
if (cmd.getSort() != null && query instanceof RankQuery == false && 
(cmd.getFlags() & GET_SCORES) != 0) {
  TopFieldCollector.populateScores(topDocs.scoreDocs, this, query);
}



Thanks

About timeAllowed when using LTR

2020-06-30 Thread Dawn
Hi:

When using the LTR, open timeAllowed parameter, LTR feature of query may call 
ExitableFilterAtomicReader. CheckAndThrow timeout detection.

If a timeout occurs at this point, the exception ExitingReaderException is 
thrown, resulting in a no-result return.

Is it possible to accommodate this exception in LTR so that any result that THE 
LTR has cleared will be returned instead of empty.

This exception occurs in two places:

1. LTRScoringQuery. CreateWeight or createWeightsParallel. Here is the loading 
stage, timeout directly end is acceptable.

2. ModelWeight.scorer. This is a stage that evaluates each Doc and can catch 
the exception, end early, and return part of the result.

PayloadCheckQParserPlugin Increase the operator parameter

2020-07-10 Thread Dawn
Hi:
Hope PayloadCheckQParserPlugin can support operator parameters, support 
the operator is a phrase or or multiple values.

As PayloadScoreQParserPlugin 

 1. Analyze parameters. localParams.get("operator", DEFAULT_OPERATOR);

 2. Create SpanQuery, call PayloadUtils.createSpanQuery(String field, 
String value, Analyzer analyzer, String operator) 




The FunctionQuery.AllScorer.Score 0 points problem

2020-10-29 Thread Dawn
Hi:
FunctionQuery. AllScorer. Score () method, If it is less than 0, it 
returns 0 points. 

But sometimes you have to compute a negative score. 

If it were the case, there would be no negative points. 

Can a global variable be turned on to control whether it has a negative 
score, compatible with different requirements.

public float score() throws IOException {
  float val = vals.floatVal(docID());
  if (val >= 0 == false) { // this covers NaN as well since comparisons with 
NaN return false
return 0;
  } else {
return boost * val;
  }
}



filterCache ramBytesUsed monitoring statistics go negative

2020-11-02 Thread Dawn


Hi:

filterCache ramBytesUsed monitoring statistics go negative.

Is there a special meaning, or is there a statistical problem
 
When present the list, can sort it by key. Solr7 is like this, easy to 
view.


For example:

CACHE.searcher.filterCache.hits:
63265

CACHE.searcher.filterCache.cumulative_evictions:
1981

CACHE.searcher.filterCache.size:
6765

CACHE.searcher.filterCache.maxRamMB:
10240

CACHE.searcher.filterCache.hitratio:
0.8329712577846243

CACHE.searcher.filterCache.warmupTime:
49227

CACHE.searcher.filterCache.evictions:
1981

CACHE.searcher.filterCache.cumulative_hitratio:
0.737519464195261

CACHE.searcher.filterCache.lookups:
75951

CACHE.searcher.filterCache.cumulative_hits:
78624

CACHE.searcher.filterCache.cumulative_inserts:
15927

CACHE.searcher.filterCache.ramBytesUsed:
-1418740612

CACHE.searcher.filterCache.inserts:
10510

CACHE.searcher.filterCache.cumulative_lookups:
106606





SolrIndexSearcher RankQuery Score calculation

2020-11-02 Thread Dawn
Hi:

SolrIndexSearcher.getDocListNC and getDocListAndSetNC code snippet:

if (cmd.getSort() != null && query instanceof RankQuery == false && 
(cmd.getFlags() & GET_SCORES) != 0) {
  TopFieldCollector.populateScores(topDocs.scoreDocs, this, query);
}


When this query includes a filterQuery, `QueryUtils.combineQueryAndFilter` will 
build A new BooleanQuery and copy it to the Query object。
so `query instanceof RankQuery` is false, This causes the score to be lost in 
the RankQuery phase.

Can you change this to determine if the original query is RankQuery: 
`cmd.getQuery() instanceof RankQuery`. 


version 8.6.*, 9.*

Solr.NestPathField

2020-11-03 Thread Dawn
Hi:

Use Solr.NestPathField to store data,

SPLITSHARD is then used to shard the shard and it is found that the child's 
data is lost.


Version 8.6.3



java.lang.IllegalArgumentException: Comparison method violates its general contract

2020-12-01 Thread Dawn
hello:

jdk11 solr8.7.0
org.apache.solr.common.SolrException: java.lang.IllegalArgumentException: 
Comparison method violates its general contract

QueryRescorer line 114
Comparator sortDocComparator = new Comparator() {
  @Override
  public int compare(ScoreDoc a, ScoreDoc b) {
// Sort by score descending, then docID ascending:
if (a.score > b.score) {
  return -1;
} else if (a.score < b.score) {
  return 1;
} else {
  // This subtraction can't overflow int
  // because docIDs are >= 0:
  return a.doc - b.doc;
}
  }
};


After 1.7, the Collections.sort() method needs to return the result of 0.
Do I have to change this to -Float.compare(a.score, b.score)

Without adding JVM parameters: -Djava.util.Arrays.useLegacyMergeSort=true



No numShards attribute exists in 'core.properties' with the newly added replica

2020-12-08 Thread Dawn
Hi

Solr8.7.0

No numShards attribute exists in 'core.properties' with the newly added 
replica. Causes numShards to be null using CloudDescriptor.

Since the ADDREPLICA command does not get numShards property, the 
coreProps will not save numShards in the constructor that creates the 
CoreDescriptor, so that the 'core.properties' file will be generated without 
numShards.

Can the numShards attribute function be added to the process of adding 
replica so that the 'core-properties' file of replica can contain numShards 
attribute?

Total newbie question: "unknown field"

2008-11-20 Thread Elise Dawn Conradi

Hi all!

For a school project at the master's program in LIS at Oslo University  
College, I am trying to index Marc-records to make a faceted browser  
of digital books.


So far, I've transformed the Marc-records to Solr-friendly records. I  
am now trying to update my index (for the first time) with an xml-file  
but I keep getting the following error report:


Error: unknown field 'author'
Description: The request sent by the client was syntactically incorrect

The documents I am trying to index look like this:


  8A7567AE1079C773
  Pusey, E. B.
  1800
  1882
  An eirenicon: in a letter to the author of "The  
Christian year" /

  0837091020
  Oxford
  409
  Keble, John,
  Manning, Henry Edward,
  Catholic Church
  Church of England
  Church of England
  Christian union
  Oxford movement
  eng
  1865
  
  
  
  
  
  
  Bibliographies
  
  
  
  



And the field section of my schema.xml looks like this:

multiValued="true"/>




multiValued="true"/>





multiValued="true"/>



stored="true" multiValued="true"/>



stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
multiValued="true"/>


stored="true" multiValued="true"/>
multiValued="true"/>


Is there anyone out there who knows how I can fix this problem?

Sincerely,
Elise



Re: Total newbie question: "unknown field"

2008-11-20 Thread Elise Dawn Conradi


Hi again!

I've figured it out. Hadn't reloaded Solr after updating the schema. Doh.

Regards,
Elise


Quoting Elise Dawn Conradi <[EMAIL PROTECTED]>:


Hi all!

For a school project at the master's program in LIS at Oslo  
University College, I am trying to index Marc-records to make a  
faceted browser of digital books.


So far, I've transformed the Marc-records to Solr-friendly records.  
I am now trying to update my index (for the first time) with an  
xml-file but I keep getting the following error report:


Error: unknown field 'author'
Description: The request sent by the client was syntactically incorrect

The documents I am trying to index look like this:


  8A7567AE1079C773
  Pusey, E. B.
  1800
  1882
  An eirenicon: in a letter to the author of  
"The Christian year" /

  0837091020
  Oxford
  409
  Keble, John,
  Manning, Henry Edward,
  Catholic Church
  Church of England
  Church of England
  Christian union
  Oxford movement
  eng
  1865
  
  
  
  
  
  
  Bibliographies
  
  
  
  



And the field section of my schema.xml looks like this:

multiValued="true"/>




multiValued="true"/>





multiValued="true"/>



stored="true" multiValued="true"/>



stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
stored="true" multiValued="true"/>
multiValued="true"/>


stored="true" multiValued="true"/>
multiValued="true"/>


Is there anyone out there who knows how I can fix this problem?

Sincerely,
Elise