Esempio n. 1
0
        public static async Task AddPDFs(List <string> uris)
        {
            //Instance of TextExtractor
            TextExtractor te = new TextExtractor();

            //List of IndexMetadata for LUCENE
            List <IndexMetadata> metadatas = new List <IndexMetadata>();

            //Process each pdf
            foreach (var item in uris)
            {
                //Upload PDF to Blob
                var pdfLink = await UploadPDFs(item);

                //Process IndexMetadata for LUCENE
                metadatas.Add(ProcessMetadata(item, te));

                //Convert all pdf pages to images
                var imageUris = Convert2Image(item);
            }

            //Index to LUCENE
            LuceneSearch.AddUpdateLuceneIndex <IndexMetadata>(metadatas);

            await Task.CompletedTask;
        }
Esempio n. 2
0
        public static async Task <List <SampleObject> > GetVisualResults(string keyword)
        {
            var result = LuceneSearch.SearchDefault <IndexMetadata>(keyword, "Text");

            return(await ProcessResult.ProcessResults(result, keyword));
        }