Documentation
¶
Index ¶
- Constants
- Variables
- func ArrayContains(arr []string, str string) bool
- func CheckConfigAndConnections(displaymode string)
- func Copy(srcFile, dstFile string) error
- func CopyDirectory(scrDir, dest string) error
- func CopySymLink(source, dest string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func DownloadApps()
- func DownloadFile(filepath string, url string) error
- func Exists(filePath string) bool
- func ExtnameToMediaType(extname string) string
- func GenerateDefaultConfigSet()
- func GenerateExcelIndex(si *solr.SolrInterface, filename string, mediatype string, ...) string
- func GeneratePdfIndex(si *solr.SolrInterface, filename string, mediatype string, ...) string
- func GenerateTextIndex(si *solr.SolrInterface, filename string, mediatype string, ...) string
- func GenerateWordxIndex(si *solr.SolrInterface, filename string, mediatype string, ...) string
- func HandlerGetMaterials(c echo.Context) error
- func ImportFromFile(files []string, tikaserveruri string, solrserveruri string, ...) error
- func SetupSolr(corename string) error
- func SolrAddDocument(si *solr.SolrInterface, materialid string, objecttype string, ...) error
- func SolrClearDocument(uriaddress string, corename string) error
- func SolrQuery(uriaddress string, corename string, qs string) (*solr.SolrResult, error)
- func SolrSchemaUpdate(uri string, corename string, schemafilename string) error
- func SolrServerPing(uri string) (string, error)
- func StartSolr(cfg *KENVCONF)
- func StartTika(cfg *KENVCONF) error
- func StopSolr(cfg *KENVCONF)
- func StopTika(cfg *KENVCONF) error
- func TikaPing(tikauri string) (string, error)
- func Unzip(src, dest string) error
- func WebCrawler(uri string, cfg *KENVCONF) (string, error)
- type FileProcessor
- type KENVCONF
- type KWQIF
- type KWRIF
- type Material
Constants ¶
View Source
const ( MSGINFO = false MSGERROR = true )
View Source
const ContenttypeExcel string = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
View Source
const ContenttypePdf string = "application/pdf"
View Source
const ContenttypeText string = "text/plain"
View Source
const ContenttypeWord string = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
View Source
const NGLBL = "\u001B[31mNG\u001B[0m"
View Source
const OKLBL = "\u001B[32mOK\u001B[0m"
View Source
const SOLRAPPURL = "https://www.apache.org/dyn/closer.lua/lucene/solr/8.11.2/solr-8.11.2.zip?action=download"
View Source
const TIKAAPPURL = "https://dlcdn.apache.org/tika/2.4.1/tika-server-standard-2.4.1.jar"
Variables ¶
View Source
var ( VERSION = "0.1.0" REVISION = "" )
View Source
var ConfigFileName = "config.json"
View Source
var DisplayModeOnCheckFunction = "error-only"
Functions ¶
func ArrayContains ¶
ArrayContains は、配列の中に特定の文字列が含まれるかを返す
func CheckConfigAndConnections ¶
func CheckConfigAndConnections(displaymode string)
CheckConfigAndConnections は、設定が正しいかをチェックする関数です。 display mode : full or error-only
func CopyDirectory ¶
func CopySymLink ¶
func DownloadApps ¶
func DownloadApps()
func DownloadFile ¶
func ExtnameToMediaType ¶
func GenerateDefaultConfigSet ¶
func GenerateDefaultConfigSet()
func GenerateExcelIndex ¶
func GenerateExcelIndex(si *solr.SolrInterface, filename string, mediatype string, doc *goquery.Document) string
GenerateExcelIndex は Excel(.xlsx)形式のファイルの索引を作る Excelの1行で Solr の1ドキュメントとする
func GeneratePdfIndex ¶
func GeneratePdfIndex(si *solr.SolrInterface, filename string, mediatype string, doc *goquery.Document) string
GeneratePdfIndex は、PDF(.pdf)形式のファイルの索引を作る PDFの1ページで Solr の1ドキュメントとする
func GenerateTextIndex ¶
func GenerateTextIndex(si *solr.SolrInterface, filename string, mediatype string, doc *goquery.Document) string
GenerateTextIndex は、テキスト形式のファイルの索引を作成します 1ファイルで Solr の1ドキュメントとする
func GenerateWordxIndex ¶
func GenerateWordxIndex(si *solr.SolrInterface, filename string, mediatype string, doc *goquery.Document) string
GenerateWordxIndex は MS WORD(.docx)形式のファイルの索引を作る 1ファイルで Solr の1ドキュメントとする
func HandlerGetMaterials ¶
func HandlerGetMaterials(c echo.Context) error
func ImportFromFile ¶
func SolrAddDocument ¶
func SolrClearDocument ¶
func SolrSchemaUpdate ¶
func SolrServerPing ¶
Types ¶
type FileProcessor ¶
type KENVCONF ¶
type KENVCONF struct { HomeDir string `json:"homeDir"` ExtDir string `json:"extDir"` ExtAppDir string `json:"extAppDir"` WebServer struct { Listen string `json:"listen"` } `json:"web"` Solr struct { Home string `json:"home"` Serveruri string `json:"serveruri"` Corename string `json:"corename"` } `json:"solr"` Tika struct { Home string `json:"home"` Serveruri string `json:"serveruri"` } `json:"tika"` Files []FileProcessor `json:"files"` }
func LoadConfig ¶
func LoadConfig() *KENVCONF
type KWQIF ¶
type KWQIF struct { QueryString string QueryMessage string NumOfPage int Curretpage int Lastpage int }
KWQIF は、Web用のレスポンス構造体
type Material ¶
type Material struct { ID string `json:"id"` MaterialID string `json:"materialid"` ObjectType string `json:"objecttype"` Foldername string `json:"foldername"` Filename string `json:"filename"` Sheetname string `json:"sheetname"` Mediatype string `json:"mediatype"` Contents []string `json:"contents"` Title string `json:"title"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.