Hi,
I’m not able to find a mail-address in a eml-file. If I have a specific word or phrase as a searchterm, it works as expected.
I would like to get the result for all “@testmail.com” and/or a specific mail-address like john.doe@testmail.com
.
Dim query As String = “*@testmail.com”
Dim query As String = “john.doe@testmail.com
”
Any ideas?
Thanks and Best Regards,
Mike
@mikewuebbold
We are investigating this scneario. Your investigation ticket ID is SEARCHNET-2675. We’ll notify you in case of any update.
hi mike i have a query, can you please resolve it
i am unable to java script for doc comparison from groupdocs in eclipse, and also unable to find the UI for comparison of documents in that project, and dont know how to run and use the same, please help
Hi,
I think there is a misunderstanding. I have this issue with GroupDocs.Search and NOT GroupDocs.Comparison.
I have follow the sample code:
Thanks
Mike
hi mike
from where to install visual basic, please share link
also will this code work for java also
regards,
shivangi
@shivangia
As far as your GroupDocs.Comparison query is concerned, we already answered it.
TestResult_1.jpg (155.1 KB)
TestResult_4.jpg (181.2 KB)
TestResult_3.jpg (123.4 KB)
TestResult_2.jpg (114.6 KB)
Search.zip (525 Bytes)
Hi,
enclosed you will find my test files. I’ve just figured out that I can easily reproduce this issue with simple text files.
Here is my code as well:
Private Sub TestBasicSearch()
’
'Dim query As String = “”“at the attached doc”""
'Dim query As String = “*@testmail.com”
'Dim query As String = “john.doe@testmail.com
”
Dim query As String = “john”
'Dim query As String = “attached”
Dim indexFolder As String = "F:\Temp\GroupDocs\Index"
Dim searchFoler As String = "F:\Temp\GroupDocs\Search"
Dim settings As IndexSettings = New IndexSettings()
Dim index As Index = New Index(indexFolder)
index.Add(searchFoler)
Dim reports As IndexingReport() = index.GetIndexingReports()
Console.WriteLine("----------------------------------------------------------------------------------------------------")
Console.WriteLine()
Console.WriteLine("Query: " & query)
Console.WriteLine("Index-Folder: " & indexFolder)
Console.WriteLine("Search-Folder: " & searchFoler)
Console.WriteLine()
For Each report As IndexingReport In reports
Console.WriteLine("----------------------------------------------------------------------------------------------------")
Console.WriteLine("INDEX REPORT")
Console.WriteLine()
Console.WriteLine("Start: " & report.StartTime.ToString)
Console.WriteLine("End: " & report.EndTime.ToString)
Console.WriteLine("Duration: " & report.IndexingTime.ToString)
Console.WriteLine()
Console.WriteLine("Documents total: " & report.TotalDocumentsInIndex.ToString)
Console.WriteLine("Terms total: " & report.TotalTermCount.ToString)
Console.WriteLine()
Console.WriteLine("Indexed documents size (MB): " & report.IndexedDocumentsSize.ToString)
Console.WriteLine("Index size (MB): " & (report.TotalIndexSize / 1024.0 / 1024.0).ToString)
Console.WriteLine()
Console.WriteLine("----------------------------------------------------------------------------------------------------")
Console.WriteLine()
Next
Dim indexedDocuments1 As DocumentInfo() = index.GetIndexedDocuments()
For Each info As DocumentInfo In indexedDocuments1
Console.WriteLine("Indexed-Document: " & info.FilePath)
Next
Console.WriteLine("----------------------------------------------------------------------------------------------------")
Console.WriteLine()
Dim result As SearchResult = index.Search(query)
If result.DocumentCount = 0 Then
Console.ForegroundColor = ConsoleColor.Yellow
Console.WriteLine("--- NO RESULT! ----")
Console.WriteLine()
Console.ResetColor()
End If
If result.DocumentCount > 0 Then
Console.WriteLine()
Console.WriteLine("Search Result:")
Console.WriteLine()
Console.WriteLine("Documents: " & result.DocumentCount)
Console.WriteLine("Occurrences: " & result.OccurrenceCount)
Console.WriteLine()
For i As Integer = 0 To result.DocumentCount - 1
Dim document As FoundDocument = result.GetFoundDocument(i)
Console.WriteLine()
Console.WriteLine(vbTab & "Document-FilePath: " & document.DocumentInfo.FilePath)
Console.WriteLine(vbTab & "Document-FileName: " & document.DocumentInfo.FilePath.Split("\").Last)
Console.WriteLine(vbTab & "Document-FileType: " & document.DocumentInfo.FileType.Extension)
Console.WriteLine(vbTab & "Relevance: " & document.Relevance)
Console.WriteLine(vbTab & "Occurrences: " & document.OccurrenceCount)
If result.DocumentCount > 0 Then
Dim fileName As String = document.DocumentInfo.FilePath.Split("\").Last
Dim HTMLfileName As String = "Highlighted_" & fileName & ".html"
Console.WriteLine(vbTab & "Write HTML Report: " & HTMLfileName)
Dim outputAdapter As OutputAdapter = New FileOutputAdapter("F:\Temp\GroupDocs\" & HTMLfileName)
Dim highlighter As HtmlHighlighter = New HtmlHighlighter(outputAdapter)
index.Highlight(document, highlighter)
End If
Next
End If
Console.WriteLine()
Console.WriteLine("Finished!")
Console.ReadLine()
End Sub
Thanks and best regards
Mike
@mikewuebbold
You can use following options:
-
If there are default settings in the index, then the symbols @ and . are Separators. In this case, you can find addresses from the desired domain with the following query:
var result = index.Search("\"testmail com\"");
A specific address can be found like this:
var result = index.Search("\"john doe testmail com\"");
-
You can set the type of characters @ and . Blended:
var index = new Index(indexFolder);
index.Dictionaries.Alphabet.SetRange(new char[] { '@', '.' }, CharacterType.Blended);
In this case, the queries will be:
var result = index.Search("?(1~80)@testmail.com");
var result = index.Search("[john.doe@testmail.com](mailto:john.doe@testmail.com)");
-
If you need to find all addresses in the text, then you can set the type of @ character in SeparateWord:
var index = new Index(indexFolder);
index.Dictionaries.Alphabet.SetRange(new char[] { '@' }, CharacterType.SeparateWord);
And in this case the query will be the following:
var result = index.Search("@");
Hi,
perfect! Thank you very much for your help!!
All the best,
Mike
1 Like
@katesmith1304
In what ways can we assist you with the GroupDocs APIs?