|
| 1 | +/** |
| 2 | + * Copyright IBM Corporation 2018 |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + **/ |
| 16 | + |
| 17 | +import Foundation |
| 18 | + |
| 19 | +/** |
| 20 | + An object contain retrieval type information. |
| 21 | + */ |
| 22 | +public struct RetrievalDetails: Codable, Equatable { |
| 23 | + |
| 24 | + /** |
| 25 | + Indentifies the document retrieval strategy used for this query. `relevancy_training` indicates that the results |
| 26 | + were returned using a relevancy trained model. `continuous_relevancy_training` indicates that the results were |
| 27 | + returned using the continuous relevancy training model created by result feedback analysis. `untrained` means the |
| 28 | + results were returned using the standard untrained model. |
| 29 | + **Note**: In the event of trained collections being queried, but the trained model is not used to return results, |
| 30 | + the **document_retrieval_strategy** will be listed as `untrained`. |
| 31 | + */ |
| 32 | + public enum DocumentRetrievalStrategy: String { |
| 33 | + case untrained = "untrained" |
| 34 | + case relevancyTraining = "relevancy_training" |
| 35 | + case continuousRelevancyTraining = "continuous_relevancy_training" |
| 36 | + } |
| 37 | + |
| 38 | + /** |
| 39 | + Indentifies the document retrieval strategy used for this query. `relevancy_training` indicates that the results |
| 40 | + were returned using a relevancy trained model. `continuous_relevancy_training` indicates that the results were |
| 41 | + returned using the continuous relevancy training model created by result feedback analysis. `untrained` means the |
| 42 | + results were returned using the standard untrained model. |
| 43 | + **Note**: In the event of trained collections being queried, but the trained model is not used to return results, |
| 44 | + the **document_retrieval_strategy** will be listed as `untrained`. |
| 45 | + */ |
| 46 | + public var documentRetrievalStrategy: String? |
| 47 | + |
| 48 | + // Map each property name to the key that shall be used for encoding/decoding. |
| 49 | + private enum CodingKeys: String, CodingKey { |
| 50 | + case documentRetrievalStrategy = "document_retrieval_strategy" |
| 51 | + } |
| 52 | + |
| 53 | +} |
0 commit comments