/**
 * Copyright (c) 2025 SoftCorporation LLC. All rights reserved.
 *
 * The Software License, Version 1.0
 *
 * SoftCorporation LLC. grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and binary
 * code form, provided that the following conditions are met:
 *
 * 1. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        SoftCorporation LLC. (http://www.softcorporation.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 2. This software and SoftCorporation name must not be used to
 *    promote products derived from the software without prior
 *    written permission. For written permission, please contact
 *    info@softcorporation.com.
 *
 * This software is provided "AS IS," without a warranty of any kind.
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
 * IN NO EVENT SHALL THE SOFTCORPORATION BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).
 *
 */
package com.softcorporation.sandi.search.model;

import java.io.Serializable;
import java.util.List;

import org.apache.solr.common.SolrDocument;

import com.softcorporation.sandi.base.model.TextChunk;

public class SearchResult implements Serializable {

    private static final long serialVersionUID = -3891337107733102495L;
    
	private String id;
    private int rank;
    private double score;
    private SolrDocument solrDocument;
    private String textHigh;
    private String textLow;
    private String textContent;
    private List<TextChunk> chunks;

    public SearchResult() {
    }

    public SearchResult(String id, int rank, SolrDocument solrDocument) {
        this.id = id;
        this.rank = rank;
        this.solrDocument = solrDocument;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public SolrDocument getSolrDocument() {
        return solrDocument;
    }

    public void setSolrDocument(SolrDocument solrDocument) {
        this.solrDocument = solrDocument;
    }

    public String getTextHigh() {
        return textHigh;
    }

    public void setTextHigh(String textHigh) {
        this.textHigh = textHigh;
    }

    public String getTextLow() {
        return textLow;
    }

    public void setTextLow(String textLow) {
        this.textLow = textLow;
    }

    public String getTextContent() {
        return textContent;
    }

    public void setTextContent(String textContent) {
        this.textContent = textContent;
    }

    public List<TextChunk> getChunks() {
        return chunks;
    }

    public void setChunks(List<TextChunk> chunks) {
        this.chunks = chunks;
    }

    @Override
    public String toString() {
    	StringBuilder sb = new StringBuilder();
    	sb.append("SearchResult{");
    	sb.append("id=");
    	sb.append(id);
    	sb.append(", rank=");
    	sb.append(rank);
    	sb.append(", solrDocument=");
    	sb.append(solrDocument);
    	sb.append("}");
        return sb.toString();
    }
    
}