Open kharalast5 opened 6 years ago
Yes, you are right.
I'll provide the methods that can point an id
field via its parameters.
I'm sorry to say, adding the param on constructor of CMQueries doesn't help for me. I'm using your command line interface, FeatureExtract with your batch shell.
I think the idField name could be passed vi command line or feature config.
Thinking about the overall design, I can't find good reason which idField is posted from command line tool to solr server side, because solr server side is the one who manage its idField name. Can we get a "uniqueKey" schema definition via Solr's API? Otherwise, I think idField definition could be in ltr_features.json, like the following, and read by solr server side.
{
"idField": "url",
"features": [
{
"name": "TF in title",
"class": "org.ltr4l.lucene.solr.server.FieldFeatureTFExtractorFactory",
"params": { "field": "title" }
},
Thank you.
Hmm.
For the present, I prepare the methods having id
field param.
In the future, I will implement the feature which reads uniqueKey
value from managed-schema as id
field.
@kharal5 Now, you can choose id field in FeatureExtract when setting 6th parameter.
There seems no way to specify idField when extracting features at calling CMQueries constructor. Since idField is fixed in the src as "id", we can't use the schema in which the unique key field is defined other than "id", for exsample, "url" in case of the livedoor news corpus. I think the idField name could be passed vi command line or feature config.
Please take a look at the following and check.
Thanks.