This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String indexFolder = "D:\\Search\\MyIndex\\"; | |
String documentsFolder = "D:\\Search\\MyDocuments\\"; | |
String searchQuery = "\u03c0\u03b1\u03b8\u03c3\u03b5"; // παθσε | |
System.out.println("Search query: " + searchQuery); | |
Index index = new Index(indexFolder, true); | |
index.addToIndex(documentsFolder); | |
SearchParameters parameters = new SearchParameters(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.groupdocs.search; | |
public class App | |
{ | |
public static void main( String[] args ) | |
{ | |
String indexFolder = "D:\\Search\\MyIndex\\"; | |
String documentsFolder = "D:\\Search\\MyDocuments\\"; | |
String searchQuery = "\u03c0\u03b1\u03b8\u03c3\u03b5"; // παθσε |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET | |
try (TiffFormat format = new TiffFormat(Common.mapSourceFilePath(path))) | |
{ | |
TiffTag[] tags = new TiffTag[] | |
{ | |
new TiffAsciiTag(TiffTagIdEnum.Artist, "GroupDocs"), | |
new TiffAsciiTag(TiffTagIdEnum.Copyright, "GroupDocs.Metadata"), | |
}; | |
format.getExifValues().setTags(tags); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET | |
try (TiffFormat format = new TiffFormat(Common.mapSourceFilePath(path))) | |
{ | |
format.getExifValues().setArtist("GroupDocs"); | |
format.getExifValues().setSoftware("GroupDocs.Metadata"); | |
format.save(Common.mapDestinationFilePath(path)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-.NET | |
// Creating cancellation object | |
Cancellation cancellation = new Cancellation(); | |
// Load index | |
Index index = new Index(Utilities.indexPath); | |
// Updating | |
index.UpdateAsync(cancellation); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-.NET | |
// Load index | |
Index index = new Index(Utilities.indexPath); | |
// Updating index | |
index.UpdateAsync(); | |
// Breaking updating | |
index.Break(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-.NET | |
Index index = new Index(Utilities.indexPath); // Creating index | |
index.AddToIndex(Utilities.documentsPath); // Indexing folder with documents | |
SearchParameters parameters = new SearchParameters(); | |
parameters.UseWordFormsSearch = true; // Enabling word forms search | |
SearchResults searchResult = index.Search("swimming", parameters); // Searching for words "swim", "swims", "swimming", "swam", "swum" | |
if (searchResult.Count > 0) | |
{ | |
// List of found files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-.NET | |
string indexFolder = Utilities.indexPath; | |
string documentFolder = Utilities.documentsPath; | |
IndexingSettings settings = new IndexingSettings(); | |
// specifying count of threads for searching | |
settings.SearchingThreads = NumberOfThreads.One; | |
Index index = new Index(indexFolder, true, settings); | |
index.AddToIndex(documentFolder); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-.NET | |
string indexFolder = Utilities.indexPath; | |
string documentFolder1 = Utilities.documentsPath; | |
string documentFolder2 = Utilities.documentsPath2; | |
string documentFolder3 = Utilities.documentsPath3; | |
Index index = new Index(indexFolder, true); | |
index.AddToIndex(documentFolder1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocsmetadata/GroupDocs_Metadata_NET | |
try | |
{ | |
using (TorrentFormat torrentFormat = new TorrentFormat(Common.MapDestinationFilePath(filePath))) | |
{ | |
TorrentMetadata info = torrentFormat.TorrentInfo; | |
Console.WriteLine(info.Announce); | |
Console.WriteLine(info.CreatedBy); | |
Console.WriteLine(info.CreationDate); | |
Console.WriteLine(info.Comment); |