diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index fb43fea301..2d905e7e49 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -258,6 +258,7 @@ org.sleuthkit.autopsy.events org.sleuthkit.autopsy.externalresults org.sleuthkit.autopsy.filesearch + org.sleuthkit.autopsy.framework org.sleuthkit.autopsy.ingest org.sleuthkit.autopsy.keywordsearchservice org.sleuthkit.autopsy.menuactions diff --git a/Core/src/org/sleuthkit/autopsy/actions/AddBlackboardArtifactTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/AddBlackboardArtifactTagAction.java index 02c2891b88..4ac2e31ab1 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/AddBlackboardArtifactTagAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/AddBlackboardArtifactTagAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/actions/AddBookmarkTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/AddBookmarkTagAction.java index 68a1549399..2fefb10d54 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/AddBookmarkTagAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/AddBookmarkTagAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * -* Copyright 2011-2016 Basis Technology Corp. +* Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/actions/ExitAction.java b/Core/src/org/sleuthkit/autopsy/actions/ExitAction.java index 15cacf490d..a8d0979a97 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/ExitAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/ExitAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,27 +25,37 @@ import org.openide.LifecycleManager; import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionRegistration; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; +import org.sleuthkit.autopsy.casemodule.CaseActionException; import org.sleuthkit.autopsy.coreutils.Logger; +/** + * The action associated with the Case/Exit menu item. It closes the current + * case, if any, and shuts down the application. + */ @ActionRegistration(displayName = "Exit", iconInMenu = true) @ActionReference(path = "Menu/Case", position = 1000, separatorBefore = 999) @ActionID(id = "org.sleuthkit.autopsy.casemodule.ExitAction", category = "Case") - final public class ExitAction implements ActionListener { + @NbBundle.Messages({ + "ExitAction.confirmationDialog.title=Ingest is Running", + "ExitAction.confirmationDialog.message=Ingest is running, are you sure you want to exit?" + + }) @Override public void actionPerformed(ActionEvent e) { - try { - Case currentCase = Case.getCurrentCase(); - if (currentCase != null) { - currentCase.closeCase(); - } - } catch (Exception ex) { - Logger.getLogger(ExitAction.class.getName()).log(Level.SEVERE, "Had a problem closing the case.", ex); //NON-NLS - } finally { - LifecycleManager.getDefault().exit(); + if (IngestRunningCheck.checkAndConfirmProceed(Bundle.ExitAction_confirmationDialog_title(), Bundle.ExitAction_confirmationDialog_message())) { + new Thread(() -> { + try { + Case.closeCurrentCase(); + } catch (CaseActionException ex) { + Logger.getLogger(ExitAction.class.getName()).log(Level.SEVERE, "Error closing the current case on exit", ex); //NON-NLS + } finally { + LifecycleManager.getDefault().exit(); + } + }).start(); } } - } diff --git a/Core/src/org/sleuthkit/autopsy/actions/IngestRunningCheck.java b/Core/src/org/sleuthkit/autopsy/actions/IngestRunningCheck.java new file mode 100644 index 0000000000..e284ee33a1 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/actions/IngestRunningCheck.java @@ -0,0 +1,53 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.sleuthkit.autopsy.actions; + +import org.openide.DialogDescriptor; +import org.openide.DialogDisplayer; +import org.openide.NotifyDescriptor; +import org.sleuthkit.autopsy.ingest.IngestManager; + +/** + * A helper for actions that checks to see if ingest is running. If it is, + * prompts the user to confirm they want to proceed with whatever operation was + * initiated (e.g., closing the case). + */ +public class IngestRunningCheck { + + /** + * Checks to see if ingest is running. If it is, prompts the user to confirm + * they want to proceed with whatever operation was initiated (e.g., closing + * the case). + * + * @param optionsDlgTitle The title for the options dialog used to confirm + * the iser's intentions. + * @param optionsDlgMessage The message for the options dialog used to + * confirm the iser's intentions. + * + * @return True to proceed, false otherwise. + */ + public static boolean checkAndConfirmProceed(String optionsDlgTitle, String optionsDlgMessage) { + if (IngestManager.getInstance().isIngestRunning()) { + NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation( + optionsDlgMessage, + optionsDlgTitle, + NotifyDescriptor.YES_NO_OPTION, + NotifyDescriptor.WARNING_MESSAGE); + descriptor.setValue(NotifyDescriptor.NO_OPTION); + Object response = DialogDisplayer.getDefault().notify(descriptor); + return (DialogDescriptor.YES_OPTION == response); + } else { + return true; + } + } + + /** + * Private contructor to prevent instantiation of a utility class. + */ + private IngestRunningCheck() { + } + +} diff --git a/Core/src/org/sleuthkit/autopsy/actions/OpenLogFolderAction.java b/Core/src/org/sleuthkit/autopsy/actions/OpenLogFolderAction.java index bbadf4291d..62a23b46b0 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/OpenLogFolderAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/OpenLogFolderAction.java @@ -1,15 +1,15 @@ /* * Autopsy Forensic Browser - * - * Copyright 2014-2015 Basis Technology Corp. + * + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,9 +18,9 @@ */ package org.sleuthkit.autopsy.actions; +import java.awt.Desktop; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.Desktop; import java.io.File; import java.io.IOException; import java.util.logging.Level; @@ -35,37 +35,58 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; /** - * Action in menu to open the folder containing the log files + * The action associated with the Help/Open Log Folder menu item. It opens a + * file explorer window for either the log subdirectory for the currently open + * case, or the log subdirectory of the user directory, if there is no current + * case. + * + * This action should only be invoked in the event dispatch thread (EDT). */ -@ActionRegistration( - displayName = "#CTL_OpenLogFolder", iconInMenu = true) +@ActionRegistration(displayName = "#CTL_OpenLogFolder", iconInMenu = true) @ActionReference(path = "Menu/Help", position = 1750) @ActionID(id = "org.sleuthkit.autopsy.actions.OpenLogFolderAction", category = "Help") public final class OpenLogFolderAction implements ActionListener { private static final Logger logger = Logger.getLogger(OpenLogFolderAction.class.getName()); - + @Override public void actionPerformed(ActionEvent e) { - try { - File logDir; - if (Case.isCaseOpen()) { - logDir = new File(Case.getCurrentCase().getLogDirectoryPath()); - } else { + File logDir; + if (Case.isCaseOpen()) { + try { + /* + * Open the log directory for the case. + */ + Case currentCase = Case.getCurrentCase(); + logDir = new File(currentCase.getLogDirectoryPath()); + } catch (IllegalStateException ex) { + /* + * There is no open case, open the application level log + * directory. + */ logDir = new File(Places.getUserDirectory().getAbsolutePath() + File.separator + "var" + File.separator + "log"); } - if (logDir.exists() == false) { - NotifyDescriptor d - = new NotifyDescriptor.Message( - NbBundle.getMessage(this.getClass(), "OpenLogFolder.error1", logDir.getAbsolutePath()), - NotifyDescriptor.ERROR_MESSAGE); - DialogDisplayer.getDefault().notify(d); - } else { + } else { + logDir = new File(Places.getUserDirectory().getAbsolutePath() + File.separator + "var" + File.separator + "log"); + } + + try { + if (logDir.exists()) { Desktop.getDesktop().open(logDir); + } else { + logger.log(Level.SEVERE, String.format("The log directory %s does not exist", logDir)); + NotifyDescriptor notifyDescriptor = new NotifyDescriptor.Message( + NbBundle.getMessage(this.getClass(), "OpenLogFolder.error1", logDir.getAbsolutePath()), + NotifyDescriptor.ERROR_MESSAGE); + DialogDisplayer.getDefault().notify(notifyDescriptor); } } catch (IOException ex) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "OpenLogFolder.CouldNotOpenLogFolder"), ex); //NON-NLS - + logger.log(Level.SEVERE, String.format("Could not open log directory %s", logDir), ex); + NotifyDescriptor notifyDescriptor = new NotifyDescriptor.Message( + NbBundle.getMessage(this.getClass(), "OpenLogFolder.CouldNotOpenLogFolder", logDir.getAbsolutePath()), + NotifyDescriptor.ERROR_MESSAGE); + DialogDisplayer.getDefault().notify(notifyDescriptor); } } + } diff --git a/Core/src/org/sleuthkit/autopsy/actions/OpenOutputFolderAction.java b/Core/src/org/sleuthkit/autopsy/actions/OpenOutputFolderAction.java index d05baf425d..c3477859e6 100644 --- a/Core/src/org/sleuthkit/autopsy/actions/OpenOutputFolderAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/OpenOutputFolderAction.java @@ -1,15 +1,15 @@ /* * Autopsy Forensic Browser - * - * Copyright 2015 Basis Technology Corp. + * + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,37 +35,45 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; /** - * Action in menu to open the folder containing the output files + * The action associated with the Tools/Open Output Folder menu item. It opens a + * file explorer window for the root output directory for the currently open + * case. If the case is a single-user case, this is the case directory. If the + * case is a multi-user case, this is a subdirectory of the case directory + * specific to the host machine. + * + * This action should only be invoked in the event dispatch thread (EDT). */ -@ActionRegistration( - displayName = "#CTL_OpenOutputFolder", iconInMenu = true, lazy=true) +@ActionRegistration(displayName = "#CTL_OpenOutputFolder", iconInMenu = true, lazy = false) @ActionReference(path = "Menu/Tools", position = 1850, separatorBefore = 1849) @ActionID(id = "org.sleuthkit.autopsy.actions.OpenOutputFolderAction", category = "Help") public final class OpenOutputFolderAction extends CallableSystemAction { + private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(OpenOutputFolderAction.class.getName()); - + @Override public void performAction() { - + File outputDir; try { - File outputDir; - if (Case.isCaseOpen()) { - outputDir = new File(Case.getCurrentCase().getOutputDirectory()); - if (outputDir.exists() == false) { - NotifyDescriptor d - = new NotifyDescriptor.Message(NbBundle.getMessage(this.getClass(), - "OpenOutputFolder.error1", outputDir.getAbsolutePath()), - NotifyDescriptor.ERROR_MESSAGE); - DialogDisplayer.getDefault().notify(d); - } else { + Case currentCase = Case.getCurrentCase(); + outputDir = new File(currentCase.getOutputDirectory()); + if (outputDir.exists()) { + try { Desktop.getDesktop().open(outputDir); + } catch (IOException ex) { + logger.log(Level.SEVERE, String.format("Failed to open output folder %s", outputDir), ex); //NON-NLS + NotifyDescriptor descriptor = new NotifyDescriptor.Message( + NbBundle.getMessage(this.getClass(), "OpenOutputFolder.CouldNotOpenOutputFolder", outputDir.getAbsolutePath()), NotifyDescriptor.ERROR_MESSAGE); + DialogDisplayer.getDefault().notify(descriptor); } } else { - JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(), "OpenOutputFolder.noCaseOpen")); + NotifyDescriptor descriptor = new NotifyDescriptor.Message( + NbBundle.getMessage(this.getClass(), "OpenOutputFolder.error1", outputDir.getAbsolutePath()), NotifyDescriptor.ERROR_MESSAGE); + DialogDisplayer.getDefault().notify(descriptor); } - } catch (IOException ex) { - logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "OpenOutputFolder.CouldNotOpenOutputFolder"), ex); //NON-NLS + } catch (IllegalStateException ex) { + logger.log(Level.SEVERE, "OpenOutputFolderAction enabled with no current case", ex); //NON-NLS + JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(), "OpenOutputFolder.noCaseOpen")); } } @@ -81,8 +89,9 @@ public final class OpenOutputFolderAction extends CallableSystemAction { @Override public boolean asynchronous() { - return false; // run on edt + return false; } + @Override public String getName() { return NbBundle.getMessage(OpenOutputFolderAction.class, "CTL_OpenOutputFolder"); diff --git a/Core/src/org/sleuthkit/autopsy/actions/ShowIngestProgressSnapshotAction.java b/Core/src/org/sleuthkit/autopsy/actions/ShowIngestProgressSnapshotAction.java index 1fa497dc2c..20bdd9753a 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/ShowIngestProgressSnapshotAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/ShowIngestProgressSnapshotAction.java @@ -1,15 +1,15 @@ /* * Autopsy Forensic Browser - * - * Copyright 2014 Basis Technology Corp. + * + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,23 +29,24 @@ import org.openide.util.actions.CallableSystemAction; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.ingest.IngestProgressSnapshotDialog; -@ActionID( - category = "Help", - id = "org.sleuthkit.autopsy.actions.ShowIngestProgressSnapshotAction" -) -@ActionRegistration( - displayName = "#CTL_ShowIngestProgressSnapshotAction", - lazy = false -) +/** + * The action associated with the Help/Get Ingest Progress Snapshot menu item. + * It opens a the Ingest Progress Snapshot dialog. + * + * This action should only be invoked in the event dispatch thread (EDT). + */ +@ActionID(category = "Help", id = "org.sleuthkit.autopsy.actions.ShowIngestProgressSnapshotAction") +@ActionRegistration(displayName = "#CTL_ShowIngestProgressSnapshotAction", lazy = false) @ActionReference(path = "Menu/Help", position = 1125) @Messages("CTL_ShowIngestProgressSnapshotAction=Ingest Status Details") public final class ShowIngestProgressSnapshotAction extends CallableSystemAction implements ActionListener { private static final String ACTION_NAME = NbBundle.getMessage(ShowIngestProgressSnapshotAction.class, "ShowIngestProgressSnapshotAction.actionName.text"); + private static final long serialVersionUID = 1L; @Override public void performAction() { - IngestProgressSnapshotDialog dialog = new IngestProgressSnapshotDialog(); + new IngestProgressSnapshotDialog(); } @Override @@ -65,6 +66,6 @@ public final class ShowIngestProgressSnapshotAction extends CallableSystemAction @Override public boolean asynchronous() { - return false; // run on edt + return false; } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java index f6a102338e..1ae20d1163 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Component; +import java.awt.Cursor; import java.awt.Dialog; import java.awt.Dimension; import java.awt.event.ActionEvent; @@ -28,7 +29,6 @@ import java.util.logging.Level; import javax.swing.Action; import javax.swing.ImageIcon; import javax.swing.JButton; -import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -44,26 +44,26 @@ import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; import org.openide.util.actions.Presenter; import org.openide.util.lookup.ServiceProvider; +import org.openide.windows.WindowManager; +import org.sleuthkit.autopsy.actions.IngestRunningCheck; import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.datamodel.Image; /** - * The action to add an image to the current Case. This action should be - * disabled on creation and it will be enabled on new case creation or case - * opened. + * An action that invokes the Add Data Source wizard. * - * @author jantonius + * This action should only be invoked in the event dispatch thread (EDT). */ -// TODO: need annotation because there's a "Lookup.getDefault().lookup(AddImageAction.class)" -// used in AddImageWizardPanel1 (among other places). It really shouldn't be done like that. @ActionID(category = "Tools", id = "org.sleuthkit.autopsy.casemodule.AddImageAction") @ActionRegistration(displayName = "#CTL_AddImage", lazy = false) -@ActionReferences(value = { - @ActionReference(path = "Toolbars/Case", position = 100)}) +@ActionReferences(value = {@ActionReference(path = "Toolbars/Case", position = 100)}) @ServiceProvider(service = AddImageAction.class) public final class AddImageAction extends CallableSystemAction implements Presenter.Toolbar { + private static final long serialVersionUID = 1L; + private static final Dimension SIZE = new Dimension(875, 550); + private final ChangeSupport cleanupSupport = new ChangeSupport(this); + // Keys into the WizardDescriptor properties that pass information between stages of the wizard // : // String: time zone that the image is from @@ -84,15 +84,13 @@ public final class AddImageAction extends CallableSystemAction implements Presen static final String NOFATORPHANS_PROP = "nofatorphans"; //NON-NLS static final Logger logger = Logger.getLogger(AddImageAction.class.getName()); - static final Dimension SIZE = new Dimension(875, 550); - private WizardDescriptor wizardDescriptor; private WizardDescriptor.Iterator iterator; private Dialog dialog; - private JButton toolbarButton = new JButton(); + private final JButton toolbarButton = new JButton(); /** - * The constructor for AddImageAction class + * Constructs an action that invokes the Add Data Source wizard. */ public AddImageAction() { putValue(Action.NAME, NbBundle.getMessage(AddImageAction.class, "CTL_AddImage")); // set the action Name @@ -106,44 +104,39 @@ public final class AddImageAction extends CallableSystemAction implements Presen } }); - this.setEnabled(false); // disable this action class + /* + * Disable this action until a case is opened. Currently, the Case class + * enables the action. + */ + this.setEnabled(false); } - /** - * Pop-up the "Add Image" wizard panel. - * - * @param e - */ @Override public void actionPerformed(ActionEvent e) { - if (IngestManager.getInstance().isIngestRunning()) { - final String msg = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.msg"); - if (JOptionPane.showConfirmDialog(null, msg, - NbBundle.getMessage(this.getClass(), - "AddImageAction.ingestConfig.ongoingIngest.title"), - JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.NO_OPTION) { - return; + String optionsDlgTitle = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.title"); + String optionsDlgMessage = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.msg"); + if (IngestRunningCheck.checkAndConfirmProceed(optionsDlgTitle, optionsDlgMessage)) { + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + iterator = new AddImageWizardIterator(this); + wizardDescriptor = new WizardDescriptor(iterator); + wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "AddImageAction.wizard.title")); + wizardDescriptor.putProperty(NAME, e); + wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); + + if (dialog != null) { + dialog.setVisible(false); // hide the old one } + dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); + Dimension d = dialog.getSize(); + dialog.setSize(SIZE); + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + dialog.setVisible(true); + dialog.toFront(); + + // Do any cleanup that needs to happen (potentially: stopping the + //add-image process, reverting an image) + runCleanupTasks(); } - - iterator = new AddImageWizardIterator(this); - wizardDescriptor = new WizardDescriptor(iterator); - wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "AddImageAction.wizard.title")); - wizardDescriptor.putProperty(NAME, e); - wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); - - if (dialog != null) { - dialog.setVisible(false); // hide the old one - } - dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor); - Dimension d = dialog.getSize(); - dialog.setSize(SIZE); - dialog.setVisible(true); - dialog.toFront(); - - // Do any cleanup that needs to happen (potentially: stopping the - //add-image process, reverting an image) - runCleanupTasks(); } /** @@ -172,12 +165,9 @@ public final class AddImageAction extends CallableSystemAction implements Presen void runTask(Image newImage); } - /** - * This method does nothing. Use the "actionPerformed(ActionEvent e)" - * instead of this method. - */ @Override public void performAction() { + actionPerformed(null); } /** @@ -191,9 +181,9 @@ public final class AddImageAction extends CallableSystemAction implements Presen } /** - * Gets the HelpCtx associated with implementing object + * Gets the help context for this action. * - * @return HelpCtx or HelpCtx.DEFAULT_HELP + * @return The help context. */ @Override public HelpCtx getHelpCtx() { @@ -201,9 +191,9 @@ public final class AddImageAction extends CallableSystemAction implements Presen } /** - * Returns the toolbar component of this action + * Gets the toolbar component for this action. * - * @return component the toolbar button + * @return The toolbar button */ @Override public Component getToolbarPresenter() { @@ -214,7 +204,7 @@ public final class AddImageAction extends CallableSystemAction implements Presen } /** - * Set this action to be enabled/disabled + * Enables and disables this action. * * @param value whether to enable this action or not */ @@ -236,8 +226,8 @@ public final class AddImageAction extends CallableSystemAction implements Presen public void requestFocusButton(String buttonText) { // get all buttons on this wizard panel Object[] wizardButtons = wizardDescriptor.getOptions(); - for (int i = 0; i < wizardButtons.length; i++) { - JButton tempButton = (JButton) wizardButtons[i]; + for (Object wizardButton : wizardButtons) { + JButton tempButton = (JButton) wizardButton; if (tempButton.getText().equals(buttonText)) { tempButton.setDefaultCapable(true); tempButton.requestFocus(); @@ -254,8 +244,6 @@ public final class AddImageAction extends CallableSystemAction implements Presen cleanupSupport.fireChange(); } - ChangeSupport cleanupSupport = new ChangeSupport(this); - /** * Instances of this class implement the cleanup() method to run cleanup * code when the wizard exits. diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 12184925e9..c4a51ac904 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -15,12 +15,6 @@ NewCaseVisualPanel1.caseNameTextField.text_1= NewCaseVisualPanel1.jLabel2.text_1=Case data will be stored in the following directory: NewCaseVisualPanel1.caseParentDirTextField.text= NewCaseVisualPanel1.caseDirTextField.text_1= -CasePropertiesForm.caseDirLabel.text=Case Directory: -CasePropertiesForm.crDateLabel.text=Created Date: -CasePropertiesForm.caseNameLabel.text=Case Name: -CasePropertiesForm.caseNameTextField.text= -CasePropertiesForm.updateCaseNameButton.text=Update Name -CasePropertiesForm.deleteCaseButton.text=Delete Case CueBannerPanel.autopsyLogo.text= CueBannerPanel.createNewLabel.text=Create New Case CueBannerPanel.openLabel.text=Open Existing Case @@ -31,8 +25,6 @@ CueBannerPanel.openCaseButton.text= CueBannerPanel.openRecentButton.text= OpenRecentCasePanel.cancelButton.text=Cancel OpenRecentCasePanel.jLabel1.text=Recent Cases -CasePropertiesForm.caseNumberLabel.text=Case Number: -CasePropertiesForm.examinerLabel.text=Examiner: NewCaseVisualPanel2.caseNumberTextField.text= NewCaseVisualPanel2.examinerLabel.text=Examiner: NewCaseVisualPanel2.caseNumberLabel.text=Case Number: @@ -98,12 +90,9 @@ AddImageWizardIngestConfigVisual.getName.text=Configure Ingest Modules AddImageWizardIterator.stepXofN=Step {0} of {1} AddLocalFilesTask.localFileAdd.progress.text=Adding\: {0}/{1} Case.getCurCase.exception.noneOpen=Cannot get the current case; there is no case open\! -Case.create.exception.msg=Error creating a case\: {0} in dir {1} Case.databaseConnectionInfo.error.msg=Error accessing database server connection info. See Tools, Options, Multi-user. -Case.open.exception.blankCase.msg=Case name is blank. Case.open.msgDlg.updated.msg=Updated case database schema.\nA backup copy of the database with the following path has been made\:\n {0} Case.open.msgDlg.updated.title=Case Database Schema Update -Case.open.exception.checkFile.msg=Case file must have {0} extension. Case.open.exception.multiUserCaseNotEnabled=Cannot open a multi-user case if multi-user cases are not enabled. See Tools, Options, Multi-user. Case.checkImgExist.confDlg.doesntExist.msg={0} has detected that one of the images associated with \n\ this case are missing. Would you like to search for them now?\n\ @@ -113,9 +102,6 @@ Please note that you will still be able to browse directories and generate repor if you choose No, but you will not be able to view file content or run the ingest process. Case.checkImgExist.confDlg.doesntExist.title=Missing Image Case.addImg.exception.msg=Error adding image to the case -Case.closeCase.exception.msg=Error while trying to close the current case. -Case.deleteCase.exception.msg=Error deleting the case dir\: {0} -Case.deleteCase.exception.msg2=Error deleting the case dir\: {0} Case.updateCaseName.exception.msg=Error while trying to update the case name. Case.updateExaminer.exception.msg=Error while trying to update the examiner. Case.updateCaseNum.exception.msg=Error while trying to update the case number. @@ -133,7 +119,6 @@ Case.GetCaseTypeGivenPath.Failure=Unable to get case type Case.metaDataFileCorrupt.exception.msg=The case metadata file (.aut) is corrupted. Case.deleteReports.deleteFromDiskException.log.msg=Unable to delete the report from the disk. Case.deleteReports.deleteFromDiskException.msg=Unable to delete the report {0} from the disk.\nYou may manually delete it from {1} -Case.exception.errorLocking=Unable to open case being updated by another user. CaseDeleteAction.closeConfMsg.text=Are you sure want to close and delete this case? \n\ Case Name\: {0}\n\ Case Directory\: {1} @@ -225,8 +210,6 @@ NewCaseVisualPanel1.caseParentDirWarningLabel.text= NewCaseVisualPanel1.multiUserCaseRadioButton.text=Multi-user NewCaseVisualPanel1.singleUserCaseRadioButton.text=Single-user NewCaseVisualPanel1.caseTypeLabel.text=Case Type: -CasePropertiesForm.lbDbType.text=Case Type: -CasePropertiesForm.lbDbName.text=Database Name: SingleUserCaseConverter.BadDatabaseFileName=Database file does not exist! SingleUserCaseConverter.AlreadyMultiUser=Case is already multi-user! SingleUserCaseConverter.NonUniqueDatabaseName=Database name not unique. @@ -241,3 +224,13 @@ LocalFilesPanel.displayNameLabel.text=Logical File Set Display Name: Default IngestJobInfoPanel.jLabel1.text=Ingest Modules IngestJobInfoPanel.jLabel2.text=Ingest Jobs CaseInformationPanel.closeButton.text=Close +CasePropertiesPanel.updateCaseNameButton.text=Update Name +CasePropertiesPanel.caseNameTextField.text= +CasePropertiesPanel.caseDirLabel.text=Case Directory: +CasePropertiesPanel.crDateLabel.text=Created Date: +CasePropertiesPanel.caseNameLabel.text=Case Name: +CasePropertiesPanel.lbDbName.text=Database Name: +CasePropertiesPanel.lbDbType.text=Case Type: +CasePropertiesPanel.examinerLabel.text=Examiner: +CasePropertiesPanel.caseNumberLabel.text=Case Number: +CasePropertiesPanel.deleteCaseButton.text=Delete Case diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties index b033efa9ca..fdb39ad133 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties @@ -1,4 +1,3 @@ -CTL_AddImage=\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u8ffd\u52a0... CTL_AddImageButton=\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u8ffd\u52a0 CTL_CaseCloseAct=\u30b1\u30fc\u30b9\u3092\u9589\u3058\u308b CTL_CaseNewAction=\u65b0\u898f\u30b1\u30fc\u30b9... @@ -12,19 +11,12 @@ NewCaseVisualPanel1.caseNameLabel.text_1=\u30b1\u30fc\u30b9\u540d\uff1a NewCaseVisualPanel1.caseDirLabel.text=\u30d9\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff1a NewCaseVisualPanel1.caseDirBrowseButton.text=\u95b2\u89a7 NewCaseVisualPanel1.jLabel2.text_1=\u30b1\u30fc\u30b9\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\uff1a -CasePropertiesForm.caseDirLabel.text=\u30b1\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff1a -CasePropertiesForm.crDateLabel.text=\u4f5c\u6210\u65e5\uff1a -CasePropertiesForm.caseNameLabel.text=\u30b1\u30fc\u30b9\u540d\uff1a -CasePropertiesForm.updateCaseNameButton.text=\u66f4\u65b0 -CasePropertiesForm.deleteCaseButton.text=\u30b1\u30fc\u30b9\u3092\u524a\u9664 CueBannerPanel.createNewLabel.text=\u65b0\u898f\u30b1\u30fc\u30b9\u3092\u4f5c\u6210 CueBannerPanel.openLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f CueBannerPanel.closeButton.text=\u9589\u3058\u308b CueBannerPanel.openRecentLabel.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u958b\u304f OpenRecentCasePanel.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb OpenRecentCasePanel.jLabel1.text=\u6700\u8fd1\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb -CasePropertiesForm.caseNumberLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a -CasePropertiesForm.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a NewCaseVisualPanel2.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a NewCaseVisualPanel2.caseNumberLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a NewCaseVisualPanel2.optionalLabel.text=\u30aa\u30d7\u30b7\u30e7\u30ca\u30eb\uff1a\u30b1\u30fc\u30b9\u756a\u53f7\u304a\u3088\u3073\u8abf\u67fb\u62c5\u5f53\u8005\u3092\u8a2d\u5b9a @@ -80,21 +72,15 @@ AddImageWizardIngestConfigVisual.getName.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30 AddImageWizardIterator.stepXofN=\u30b9\u30c6\u30c3\u30d7{0}\uff0f{1} AddLocalFilesTask.localFileAdd.progress.text=\u8ffd\u52a0\u4e2d\uff1a{0}/{1} Case.getCurCase.exception.noneOpen=\u4f5c\u696d\u4e2d\u306e\u30b1\u30fc\u30b9\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\uff1b\u958b\u3044\u3066\u3044\u308b\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\uff01 -Case.create.exception.msg=\u30b1\u30fc\u30b9\u4f5c\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea{1}\u306e{0} -Case.open.exception.blankCase.msg=\u30b1\u30fc\u30b9\u540d\u304c\u7a7a\u767d\u3067\u3059\u3002 Case.open.msgDlg.updated.msg=\u30b1\u30fc\u30b9\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30b9\u30ad\u30fc\u30de\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002\n\u6b21\u306e\u30d1\u30b9\u3092\u6301\u3064\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30b3\u30d4\u30fc\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\uff1a\n\ {0} Case.open.msgDlg.updated.title=\u30b1\u30fc\u30b9\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30b9\u30ad\u30fc\u30de\u3092\u66f4\u65b0 -Case.open.exception.checkFile.msg=\u30b1\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306f{0}\u62e1\u5f35\u5b50\u304c\u5fc5\u8981\u3067\u3059\u3002 Case.checkImgExist.confDlg.doesntExist.msg={0} \u304c\u3053\u306e\u30b1\u30fc\u30b9\u306b\u95a2\u9023\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u306e\u3046\u3061\uff11\u3064\u304c\u6b20\u843d\u3057\u3066\u3044\u308b\u306e\u3092\u691c\u51fa\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u3092\u4eca\u304b\u3089\u691c\u7d22\u3057\u307e\u3059\u304b\uff1f\n\n\ \u4ee5\u524d\u3001\u30a4\u30e1\u30fc\u30b8\u306f\u6b21\u306b\u3042\u308a\u307e\u3057\u305f\uff1a\n\ {1}\n\ \u3044\u3044\u3048\u3092\u9078\u629e\u3057\u3066\u3082\u3001\u4eca\u5f8c\u3082\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u95b2\u89a7\u3057\u3001\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u304c\u3067\u304d\u307e\u3059\u304c\u3001\n\u30d5\u30a1\u30a4\u30eb\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u8868\u793a\u307e\u305f\u306f\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30d7\u30ed\u30bb\u30b9\u306e\u5b9f\u884c\u304c\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002 Case.checkImgExist.confDlg.doesntExist.title=\u6b20\u843d\u3057\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8 Case.addImg.exception.msg=\u30b1\u30fc\u30b9\u306b\u30a4\u30e1\u30fc\u30b8\u3092\u8ffd\u52a0\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -Case.closeCase.exception.msg=\u4f5c\u696d\u4e2d\u306e\u30b1\u30fc\u30b9\u3092\u9589\u3058\u308b\u6700\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -Case.deleteCase.exception.msg=\u30b1\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u524a\u9664\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a{0} -Case.deleteCase.exception.msg2=\u30b1\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u524a\u9664\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a{0} Case.updateCaseName.exception.msg=\u30b1\u30fc\u30b9\u540d\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 Case.updateExaminer.exception.msg=\u8abf\u67fb\u62c5\u5f53\u8005\u3092\u66f4\u65b0\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 Case.updateCaseNum.exception.msg=\u30b1\u30fc\u30b9\u756a\u53f7\u3092\u66f4\u65b0\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 @@ -203,8 +189,6 @@ CollaborationMonitor.addingDataSourceStatus.msg={0}\u304c\u30c7\u30fc\u30bf\u30d CollaborationMonitor.analyzingDataSourceStatus.msg={0}\u304c{1}\u3092\u89e3\u6790\u4e2d NewCaseVisualPanel1.multiUserCaseRadioButton.text=\u8907\u6570\u30e6\u30fc\u30b6\u30fc NewCaseVisualPanel1.singleUserCaseRadioButton.text=\u5358\u6570\u30e6\u30fc\u30b6\u30fc -CasePropertiesForm.lbDbType.text=\u30b1\u30fc\u30b9\u30bf\u30a4\u30d7\uff1a -CasePropertiesForm.lbDbName.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\uff1a SingleUserCaseConverter.BadDatabaseFileName=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u307e\u305b\u3093\uff01 SingleUserCaseConverter.AlreadyMultiUser=\u30b1\u30fc\u30b9\u306f\u65e2\u306b\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u3067\u3059\uff01 SingleUserCaseConverter.NonUniqueDatabaseName=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\u304c\u30e6\u30cb\u30fc\u30af\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 @@ -216,3 +200,12 @@ Case_caseType_multiUser=\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u30b1\u30fc\u30b9 Case_caseType_singleUser=\u5358\u6570\u30e6\u30fc\u30b6\u30fc\u30b1\u30fc\u30b9 CasePropertiesForm.imagesTable.columnModel.title0=\u30d1\u30b9 CasePropertiesForm.imagesTable.columnModel.title1=\u524a\u9664 +CasePropertiesPanel.updateCaseNameButton.text=\u66f4\u65b0 +CasePropertiesPanel.caseDirLabel.text=\u30b1\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff1a +CasePropertiesPanel.crDateLabel.text=\u4f5c\u6210\u65e5\uff1a +CasePropertiesPanel.caseNameLabel.text=\u30b1\u30fc\u30b9\u540d\uff1a +CasePropertiesPanel.lbDbName.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\uff1a +CasePropertiesPanel.lbDbType.text=\u30b1\u30fc\u30b9\u30bf\u30a4\u30d7\uff1a +CasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a +CasePropertiesPanel.caseNumberLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a +CasePropertiesPanel.deleteCaseButton.text=\u30b1\u30fc\u30b9\u3092\u524a\u9664 diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index d681e81b48..ad21349a82 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,14 +18,20 @@ */ package org.sleuthkit.autopsy.casemodule; -import java.awt.Cursor; import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.Paths; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.Statement; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; @@ -33,24 +39,28 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.MissingResourceException; import java.util.Set; import java.util.TimeZone; import java.util.UUID; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.stream.Collectors; import java.util.stream.Stream; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executors; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; +import javax.annotation.concurrent.GuardedBy; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; +import org.openide.util.Lookup; import org.openide.util.NbBundle; import org.openide.util.NbBundle.Messages; import org.openide.util.actions.CallableSystemAction; import org.openide.windows.WindowManager; +import org.sleuthkit.autopsy.actions.OpenOutputFolderAction; import org.sleuthkit.autopsy.casemodule.CaseMetadata.CaseMetadataException; import org.sleuthkit.autopsy.casemodule.events.AddingDataSourceEvent; import org.sleuthkit.autopsy.casemodule.events.AddingDataSourceFailedEvent; @@ -62,6 +72,8 @@ import org.sleuthkit.autopsy.casemodule.events.DataSourceAddedEvent; import org.sleuthkit.autopsy.casemodule.events.ReportAddedEvent; import org.sleuthkit.autopsy.casemodule.services.Services; import org.sleuthkit.autopsy.coordinationservice.CoordinationService; +import org.sleuthkit.autopsy.coordinationservice.CoordinationService.CoordinationServiceException; +import org.sleuthkit.autopsy.coordinationservice.CoordinationService.Lock; import org.sleuthkit.autopsy.coordinationservice.CoordinationServiceNamespace; import org.sleuthkit.autopsy.core.RuntimeProperties; import org.sleuthkit.autopsy.core.UserPreferences; @@ -78,27 +90,90 @@ import org.sleuthkit.autopsy.coreutils.Version; import org.sleuthkit.autopsy.events.AutopsyEvent; import org.sleuthkit.autopsy.events.AutopsyEventException; import org.sleuthkit.autopsy.events.AutopsyEventPublisher; +import org.sleuthkit.autopsy.framework.AutopsyService; +import org.sleuthkit.autopsy.framework.AutopsyService.CaseContext; +import org.sleuthkit.autopsy.framework.LoggingProgressIndicator; +import org.sleuthkit.autopsy.framework.ModalDialogProgressIndicator; +import org.sleuthkit.autopsy.framework.ProgressIndicator; import org.sleuthkit.autopsy.ingest.IngestJob; import org.sleuthkit.autopsy.ingest.IngestManager; +import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService; import org.sleuthkit.autopsy.timeline.OpenTimelineAction; import org.sleuthkit.datamodel.BlackboardArtifactTag; +import org.sleuthkit.datamodel.CaseDbConnectionInfo; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.ContentTag; import org.sleuthkit.datamodel.Image; import org.sleuthkit.datamodel.Report; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskCoreException; -import org.sleuthkit.datamodel.TskException; /** * An Autopsy case. Currently, only one case at a time may be open. */ -public class Case implements SleuthkitCase.ErrorObserver { +public class Case { + + private static final int NAME_LOCK_TIMOUT_HOURS = 12; + private static final int SHARED_DIR_LOCK_TIMOUT_HOURS = 12; + private static final int RESOURCE_LOCK_TIMOUT_HOURS = 12; + private static final int MAX_SANITIZED_CASE_NAME_LEN = 47; + private static final String SINGLE_USER_CASE_DB_NAME = "autopsy.db"; + private static final String EVENT_CHANNEL_NAME = "%s-Case-Events"; //NON-NLS + private static final String CACHE_FOLDER = "Cache"; //NON-NLS + private static final String EXPORT_FOLDER = "Export"; //NON-NLS + private static final String LOG_FOLDER = "Log"; //NON-NLS + private static final String REPORTS_FOLDER = "Reports"; //NON-NLS + private static final String TEMP_FOLDER = "Temp"; //NON-NLS + private static final int MIN_SECS_BETWEEN_TSK_ERROR_REPORTS = 60; + private static final String MODULE_FOLDER = "ModuleOutput"; //NON-NLS + private static final Logger logger = Logger.getLogger(Case.class.getName()); + private static final AutopsyEventPublisher eventPublisher = new AutopsyEventPublisher(); + + /* + * The following fields are the mutable state associated with the current + * case concept. The currentCase field is guarded for writes by the + * currentCaseWriteLock. The field is also volatile to allow non-locking + * reads via the isCaseOpen and getCurrentCase methods. This is unfortunate, + * but Case clients that do not respond correctly to CURRENT_CASE closed + * events may call these methods and that would be a source of potential + * deadlock if the currentCaseWriteLock was used to guard read access. + * + * TODO (JIRA-2228): Throw CaseClosedException from Case instance methods. + */ + private static final Object currentCaseWriteLock = new Object(); + @GuardedBy("currentCaseWriteLock") + private static volatile Case currentCase; + + /* + * The application name, used to make the title of the main application + * window [application name] when there is no open case and [curent case + * display name] - [application name] when there is an open case. + * Initialized by getting the main window title before a case has been + * opened. A reference to the main window frame is obtained at the same time + * as a convenmient side effect for parenting dialogs. + * + * TODO (JIRA-2231): Make the application name a RuntimeProperties item. + */ + @GuardedBy("currentCaseWriteLock") + private static Frame mainFrame; + @GuardedBy("currentCaseWriteLock") + private static String appName; + + /* + * Case instance data. + */ + private CaseMetadata caseMetadata; + private CoordinationService.Lock caseDirLock; + private ExecutorService caseLockingExecutor; + private SleuthkitCase caseDb; + private SleuthkitErrorReporter sleuthkitErrorReporter; + private CollaborationMonitor collaborationMonitor; + private Services caseServices; + private boolean hasDataSources; /** * An enumeration of case types. */ - @NbBundle.Messages({"Case_caseType_singleUser=Single-user case", "Case_caseType_multiUser=Multi-user case"}) public enum CaseType { SINGLE_USER_CASE("Single-user case"), //NON-NLS @@ -107,12 +182,21 @@ public class Case implements SleuthkitCase.ErrorObserver { private final String typeName; /** - * Constructs a case type. + * Gets a case type from a case type name string. * - * @param typeName The type name. + * @param typeName The case type name string. + * + * @return */ - private CaseType(String typeName) { - this.typeName = typeName; + public static CaseType fromString(String typeName) { + if (typeName != null) { + for (CaseType c : CaseType.values()) { + if (typeName.equalsIgnoreCase(c.toString())) { + return c; + } + } + } + return null; } /** @@ -128,8 +212,12 @@ public class Case implements SleuthkitCase.ErrorObserver { /** * Gets the localized display name for this case type. * - * @return The dis[play name. + * @return The display name. */ + @Messages({ + "Case_caseType_singleUser=Single-user case", + "Case_caseType_multiUser=Multi-user case" + }) String getLocalizedDisplayName() { if (fromString(typeName) == SINGLE_USER_CASE) { return Bundle.Case_caseType_singleUser(); @@ -139,30 +227,21 @@ public class Case implements SleuthkitCase.ErrorObserver { } /** - * Gets a case type from a case type name string + * Constructs a case type. * - * @param typeName The case type name string. - * - * @return + * @param typeName The type name. */ - public static CaseType fromString(String typeName) { - if (typeName != null) { - for (CaseType c : CaseType.values()) { - if (typeName.equalsIgnoreCase(c.typeName)) { - return c; - } - } - } - return null; + private CaseType(String typeName) { + this.typeName = typeName; } /** - * Tests the equality of the type name of this case type with a case - * type name. + * Tests the equality of the type name of this case type with another + * case type name. * - * @param otherTypeName A case type name + * @param otherTypeName A case type name, * - * @return True or false + * @return True or false, * * @deprecated Do not use. */ @@ -174,8 +253,8 @@ public class Case implements SleuthkitCase.ErrorObserver { }; /** - * An enumeration of events (property change events) a case may publish - * (fire). + * An enumeration of the case events (property change events) a case may + * publish (fire). */ public enum Events { @@ -187,8 +266,8 @@ public class Case implements SleuthkitCase.ErrorObserver { NAME, /** * The number of the current case has changed. The old value of the - * PropertyChangeEvent is the old number (type: String), the new value - * is the new case number (type: String). + * PropertyChangeEvent is the old case number (type: String), the new + * value is the new case number (type: String). */ NUMBER, /** @@ -202,7 +281,7 @@ public class Case implements SleuthkitCase.ErrorObserver { * made. The old and new values of the PropertyChangeEvent are null. * Cast the PropertyChangeEvent to * org.sleuthkit.autopsy.casemodule.events.AddingDataSourceEvent to - * access event data. + * access additional event data. */ ADDING_DATA_SOURCE, /** @@ -210,7 +289,7 @@ public class Case implements SleuthkitCase.ErrorObserver { * The old and new values of the PropertyChangeEvent are null. Cast the * PropertyChangeEvent to * org.sleuthkit.autopsy.casemodule.events.AddingDataSourceFailedEvent - * to access event data. + * to access additional event data. */ ADDING_DATA_SOURCE_FAILED, /** @@ -218,7 +297,7 @@ public class Case implements SleuthkitCase.ErrorObserver { * of the PropertyChangeEvent is null, the new value is the newly-added * data source (type: Content). Cast the PropertyChangeEvent to * org.sleuthkit.autopsy.casemodule.events.DataSourceAddedEvent to - * access event data. + * access additional event data. */ DATA_SOURCE_ADDED, /** @@ -228,11 +307,23 @@ public class Case implements SleuthkitCase.ErrorObserver { */ DATA_SOURCE_DELETED, /** - * The current case has changed. If a case has been opened, the old - * value of the PropertyChangeEvent is null, the new value is the new - * case (type: Case). If a case has been closed, the old value of the - * PropertyChangeEvent is the closed case (type: Case), the new value is - * null. + * The current case has changed. + * + * If a new case has been opened as the current case, the old value of + * the PropertyChangeEvent is null, and the new value is the new case + * (type: Case). + * + * If the current case has been closed, the old value of the + * PropertyChangeEvent is the closed case (type: Case), and the new + * value is null. IMPORTANT: Subscribers to this event should not call + * isCaseOpen or getCurrentCase in the interval between a case closed + * event and a case opened event. If there is any need for upon closing + * interaction with a closed case, the case in the old value should be + * used, and it should be done synchronously in the CURRENT_CASE event + * handler. + * + * TODO (JIRA-2228): Throw CaseClosedException from Case instance + * methods. */ CURRENT_CASE, /** @@ -242,7 +333,7 @@ public class Case implements SleuthkitCase.ErrorObserver { */ REPORT_ADDED, /** - * A report has been added to the current case. The old value of the + * A report has been deleted from the current case. The old value of the * PropertyChangeEvent is the report (type: Report), the new value is * null. */ @@ -255,8 +346,7 @@ public class Case implements SleuthkitCase.ErrorObserver { BLACKBOARD_ARTIFACT_TAG_ADDED, /** * A tag has been removed from an artifact associated with the current - * case. The old value of the PropertyChangeEvent is is the tag info - * (type: + * case. The old value of the PropertyChangeEvent is the tag info (type: * BlackBoardArtifactTagDeletedEvent.DeletedBlackboardArtifactTagInfo), * the new value is null. */ @@ -275,38 +365,6 @@ public class Case implements SleuthkitCase.ErrorObserver { CONTENT_TAG_DELETED; }; - private static final int MAX_SANITIZED_CASE_NAME_LEN = 47; - private static final String EVENT_CHANNEL_NAME = "%s-Case-Events"; //NON-NLS - private static final String CACHE_FOLDER = "Cache"; //NON-NLS - private static final String EXPORT_FOLDER = "Export"; //NON-NLS - private static final String LOG_FOLDER = "Log"; //NON-NLS - private static final String REPORTS_FOLDER = "Reports"; //NON-NLS - private static final String TEMP_FOLDER = "Temp"; //NON-NLS - static final String MODULE_FOLDER = "ModuleOutput"; //NON-NLS - private static final int MIN_SECS_BETWEEN_TSK_ERROR_REPORTS = 60; - private static final Logger logger = Logger.getLogger(Case.class.getName()); - private static final AutopsyEventPublisher eventPublisher = new AutopsyEventPublisher(); - private static String appName; - private static Case currentCase; - private static CoordinationService.Lock currentCaseLock; - private static ExecutorService currentCaseExecutor; - private final CaseMetadata caseMetadata; - private final SleuthkitCase db; - private final Services services; - private CollaborationMonitor collaborationMonitor; - private boolean hasDataSources; - private volatile IntervalErrorReportData tskErrorReporter; - - /** - * Constructs an Autopsy case. Currently, only one case at a time may be - * open. - */ - private Case(CaseMetadata caseMetadata, SleuthkitCase db) { - this.caseMetadata = caseMetadata; - this.db = db; - this.services = new Services(db); - } - /** * Adds a subscriber to all case events. To subscribe to only specific * events, use one of the overloads of addEventSubscriber. @@ -372,7 +430,116 @@ public class Case implements SleuthkitCase.ErrorObserver { } /** - * Checks if case is currently open. + * Checks if a case display name is valid, i.e., does not include any + * characters that cannot be used in file names. + * + * @param caseName The candidate case name. + * + * @return True or false. + */ + public static boolean isValidName(String caseName) { + return !(caseName.contains("\\") || caseName.contains("/") || caseName.contains(":") + || caseName.contains("*") || caseName.contains("?") || caseName.contains("\"") + || caseName.contains("<") || caseName.contains(">") || caseName.contains("|")); + } + + /** + * Creates a new case and makes it the current case. + * + * IMPORTANT: This method should not be called in the event dispatch thread + * (EDT). + * + * @param caseDir The full path of the case directory. The directory + * will be created if it doesn't already exist; if it + * exists, it is ASSUMED it was created by calling + * createCaseDirectory. + * @param caseDisplayName The display name of case, which may be changed + * later by the user. + * @param caseNumber The case number, can be the empty string. + * @param examiner The examiner to associate with the case, can be + * the empty string. + * @param caseType The type of case (single-user or multi-user). + * + * @throws CaseActionException if there is a problem creating the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + @Messages({ + "# {0} - exception message", "Case.exceptionMessage.wrapperMessage={0}" + }) + public static void createAsCurrentCase(String caseDir, String caseDisplayName, String caseNumber, String examiner, CaseType caseType) throws CaseActionException { + synchronized (currentCaseWriteLock) { + if (RuntimeProperties.runningWithGUI()) { + getMainWindowAndAppName(); + } + + if (null != currentCase) { + try { + closeCurrentCase(); + } catch (CaseActionException ex) { + logger.log(Level.SEVERE, "Error closing the previous current case", ex); //NON-NLS + } + } + + logger.log(Level.INFO, "Creating current case with display name {0} in {1}", new Object[]{caseDisplayName, caseDir}); //NON-NLS + Case newCurrentCase = new Case(); + newCurrentCase.open(caseDir, caseDisplayName, caseNumber, examiner, caseType); + currentCase = newCurrentCase; + logger.log(Level.INFO, "Created currrent case {0} (display name {1}) in {2}", new Object[]{newCurrentCase.getName(), caseDisplayName, caseDir}); //NON-NLS + if (RuntimeProperties.runningWithGUI()) { + updateGUIForCaseOpened(newCurrentCase); + } + eventPublisher.publishLocally(new AutopsyEvent(Events.CURRENT_CASE.toString(), null, newCurrentCase)); + } + } + + /** + * Opens an existing case and makes it the current case. + * + * IMPORTANT: This method should not be called in the event dispatch thread + * (EDT). + * + * @param caseMetadataFilePath The path of the case metadata (.aut) file. + * + * @throws CaseActionException if there is a problem opening the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + @Messages({ + "# {0} - exception message", "Case.openException.couldNotOpenCase=Could not open case: {0}", + "Case.progressIndicatorTitle.openingCase=Opening Case", + "Case.exceptionMessage.failedToReadMetadata=Failed to read metadata." + }) + public static void openAsCurrentCase(String caseMetadataFilePath) throws CaseActionException { + synchronized (currentCaseWriteLock) { + if (RuntimeProperties.runningWithGUI()) { + getMainWindowAndAppName(); + } + + if (null != currentCase) { + try { + closeCurrentCase(); + } catch (CaseActionException ex) { + logger.log(Level.SEVERE, "Error closing the previous current case", ex); + } + } + + Case newCurrentCase = new Case(); + logger.log(Level.INFO, "Opening case with metadata file path {0} as current case", caseMetadataFilePath); //NON-NLS + newCurrentCase.open(Paths.get(caseMetadataFilePath)); + currentCase = newCurrentCase; + logger.log(Level.INFO, "Opened case with metadata file path {0} as current case", caseMetadataFilePath); //NON-NLS + if (RuntimeProperties.runningWithGUI()) { + updateGUIForCaseOpened(newCurrentCase); + } + eventPublisher.publishLocally(new AutopsyEvent(Events.CURRENT_CASE.toString(), null, currentCase)); + } + } + + /** + * Checks if a case, the current case, is open at the time it is called. * * @return True or false. */ @@ -381,27 +548,616 @@ public class Case implements SleuthkitCase.ErrorObserver { } /** - * Gets the current case, if there is one. + * Gets the current case, if there is one, at the time of the call. * * @return The current case. * * @throws IllegalStateException if there is no current case. */ public static Case getCurrentCase() { - if (currentCase != null) { - return currentCase; + Case caseToReturn = currentCase; + if (null != caseToReturn) { + return caseToReturn; } else { throw new IllegalStateException(NbBundle.getMessage(Case.class, "Case.getCurCase.exception.noneOpen")); } } + /** + * Closes the current case if there is a current case. + * + * IMPORTANT: This method should not be called in the event dispatch thread + * (EDT). + * @throws CaseActionException + */ + @Messages({ + "# {0} - exception message", "Case.closeException.couldNotCloseCase=Error closing case: {0}", + "Case.progressIndicatorTitle.closingCase=Closing Case" + }) + public static void closeCurrentCase() throws CaseActionException { + synchronized (currentCaseWriteLock) { + if (null == currentCase) { + return; + } + String caseName = currentCase.getName(); + String caseDir = currentCase.getCaseDirectory(); + try { + Case closedCase = currentCase; + eventPublisher.publishLocally(new AutopsyEvent(Events.CURRENT_CASE.toString(), closedCase, null)); + logger.log(Level.INFO, "Closing current case {0} in {1}", new Object[]{caseName, caseDir}); //NON-NLS + currentCase = null; + closedCase.close(); + } finally { + /* + * The case is no longer the current case, even if an exception + * was thrown. + */ + logger.log(Level.INFO, "Closed current case {0} in {1}", new Object[]{caseName, caseDir}); //NON-NLS + if (RuntimeProperties.runningWithGUI()) { + updateGUIForCaseClosed(); + } + } + } + } + + /** + * Deletes the current case. + * + * IMPORTANT: This method should not be called in the event dispatch thread + * (EDT). + * + * @throws CaseActionException if there is a problem deleting the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + public static void deleteCurrentCase() throws CaseActionException { + synchronized (currentCaseWriteLock) { + if (null == currentCase) { + return; + } + CaseMetadata metadata = currentCase.getCaseMetadata(); + closeCurrentCase(); + deleteCase(metadata); + } + } + + /** + * Deletes a case. This method cannot be used to delete the current case; + * deleting the current case must be done by calling Case.deleteCurrentCase. + * + * @param metadata The metadata for the case to delete. + * + * @throws CaseActionException if there is a problem deleting the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + @Messages({ + "# {0} - exception message", "Case.deleteException.couldNotDeleteCase=Could not delete case: {0}", + "Case.progressIndicatorTitle.deletingCase=Deleting Case", + "Case.exceptionMessage.cannotDeleteCurrentCase=Cannot delete current case, it must be closed first", + "Case.progressMessage.deletingTextIndex=Deleting text index...", + "Case.progressMessage.deletingCaseDatabase=Deleting case database...", + "Case.exceptionMessage.cancelled=Cancelled by user" + }) + public static void deleteCase(CaseMetadata metadata) throws CaseActionException { + synchronized (currentCaseWriteLock) { + if (null != currentCase && 0 == metadata.getCaseDirectory().compareTo(metadata.getCaseDirectory())) { + throw new CaseActionException(Bundle.Case_deleteException_couldNotDeleteCase(Bundle.Case_exceptionMessage_cannotDeleteCurrentCase())); + } + } + + /* + * Set up either a GUI progress indicator or a logging progress + * indicator. + */ + ProgressIndicator progressIndicator; + if (RuntimeProperties.runningWithGUI()) { + progressIndicator = new ModalDialogProgressIndicator( + mainFrame, + Bundle.Case_progressIndicatorTitle_deletingCase()); + } else { + progressIndicator = new LoggingProgressIndicator(); + } + progressIndicator.start(Bundle.Case_progressMessage_preparing()); + + logger.log(Level.INFO, "Deleting case with metadata file path {0}", metadata.getFilePath()); //NON-NLS + ExecutorService executor = Executors.newSingleThreadExecutor(); + Future future = executor.submit(() -> { + if (CaseType.SINGLE_USER_CASE == metadata.getCaseType()) { + cleanupDeletedCase(metadata, progressIndicator); + } else { + /* + * First, acquire an exclusive case directory lock. The case + * cannot be deleted if another node has it open. + */ + progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks()); + try (CoordinationService.Lock dirLock = CoordinationService.getServiceForNamespace(CoordinationServiceNamespace.getRoot()).tryGetExclusiveLock(CoordinationService.CategoryNode.CASES, metadata.getCaseDirectory())) { + assert (null != dirLock); + + /* + * Delete the text index. + */ + progressIndicator.start(Bundle.Case_progressMessage_deletingTextIndex()); + + for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class + )) { + searchService.deleteTextIndex(metadata.getTextIndexName()); + } + + if (CaseType.MULTI_USER_CASE == metadata.getCaseType()) { + /* + * Delete the case database from the database server. + * The case database for a single-user case is in the + * case directory and will be deleted whe it is deleted. + */ + progressIndicator.start(Bundle.Case_progressMessage_deletingCaseDatabase()); + CaseDbConnectionInfo db = UserPreferences.getDatabaseConnectionInfo(); + Class.forName("org.postgresql.Driver"); //NON-NLS + try (Connection connection = DriverManager.getConnection("jdbc:postgresql://" + db.getHost() + ":" + db.getPort() + "/postgres", db.getUserName(), db.getPassword()); //NON-NLS + Statement statement = connection.createStatement();) { + String deleteCommand = "DROP DATABASE \"" + metadata.getCaseDatabaseName() + "\""; //NON-NLS + statement.execute(deleteCommand); + } + } + + cleanupDeletedCase(metadata, progressIndicator); + } + } + return null; + }); + + try { + future.get(); + logger.log(Level.INFO, "Deleted case with metadata file path {0}", metadata.getFilePath()); //NON-NLS + } catch (InterruptedException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getMessage()), ex); + } catch (ExecutionException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getCause().getMessage()), ex); + } catch (CancellationException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_cancelled(), ex); + } finally { + executor.shutdown(); + } + } + + /** + * Sanitizes the case name for use as a PostgreSQL database name and in + * ActiveMQ event channel (topic) names. + * + * PostgreSQL: + * http://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html 63 + * chars max, must start with a-z or _ following chars can be letters _ or + * digits + * + * ActiveMQ: + * http://activemq.2283324.n4.nabble.com/What-are-limitations-restrictions-on-destination-name-td4664141.html + * may not be ? + * + * @param caseName A candidate case name. + * + * @return The sanitized case name. + * + * @throws org.sleuthkit.autopsy.casemodule.Case.IllegalCaseNameException + */ + static String sanitizeCaseName(String caseName) throws IllegalCaseNameException { + + String result; + + // Remove all non-ASCII characters + result = caseName.replaceAll("[^\\p{ASCII}]", "_"); //NON-NLS + + // Remove all control characters + result = result.replaceAll("[\\p{Cntrl}]", "_"); //NON-NLS + + // Remove / \ : ? space ' " + result = result.replaceAll("[ /?:'\"\\\\]", "_"); //NON-NLS + + // Make it all lowercase + result = result.toLowerCase(); + + // Must start with letter or underscore for PostgreSQL. If not, prepend an underscore. + if (result.length() > 0 && !(Character.isLetter(result.codePointAt(0))) && !(result.codePointAt(0) == '_')) { + result = "_" + result; + } + + // Chop to 63-16=47 left (63 max for PostgreSQL, taking 16 for the date _20151225_123456) + if (result.length() > MAX_SANITIZED_CASE_NAME_LEN) { + result = result.substring(0, MAX_SANITIZED_CASE_NAME_LEN); + } + + if (result.isEmpty()) { + throw new IllegalCaseNameException(String.format("Failed to sanitize case name '%s'", caseName)); + } + + return result; + } + + /** + * Creates a case directory and its subdirectories. + * + * @param caseDir Path to the case directory (typically base + case name). + * @param caseType The type of case, single-user or multi-user. + * + * @throws CaseActionException throw if could not create the case dir + */ + static void createCaseDirectory(String caseDir, CaseType caseType) throws CaseActionException { + + File caseDirF = new File(caseDir); + + if (caseDirF.exists()) { + if (caseDirF.isFile()) { + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.existNotDir", caseDir)); + + } else if (!caseDirF.canRead() || !caseDirF.canWrite()) { + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.existCantRW", caseDir)); + } + } + + try { + boolean result = (caseDirF).mkdirs(); // create root case Directory + + if (result == false) { + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreate", caseDir)); + } + + // create the folders inside the case directory + String hostClause = ""; + + if (caseType == CaseType.MULTI_USER_CASE) { + hostClause = File.separator + NetworkUtils.getLocalHostName(); + } + result = result && (new File(caseDir + hostClause + File.separator + EXPORT_FOLDER)).mkdirs() + && (new File(caseDir + hostClause + File.separator + LOG_FOLDER)).mkdirs() + && (new File(caseDir + hostClause + File.separator + TEMP_FOLDER)).mkdirs() + && (new File(caseDir + hostClause + File.separator + CACHE_FOLDER)).mkdirs(); + + if (result == false) { + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateCaseDir", caseDir)); + } + + final String modulesOutDir = caseDir + hostClause + File.separator + MODULE_FOLDER; + result = new File(modulesOutDir).mkdir(); + + if (result == false) { + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateModDir", + modulesOutDir)); + } + + final String reportsOutDir = caseDir + hostClause + File.separator + REPORTS_FOLDER; + result = new File(reportsOutDir).mkdir(); + + if (result == false) { + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateReportsDir", + modulesOutDir)); + + } + + } catch (MissingResourceException | CaseActionException e) { + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.gen", caseDir), e); + } + } + + /** + * Gets the paths of data sources that are images. + * + * @param db A case database. + * + * @return A mapping of object ids to image paths. + */ + static Map getImagePaths(SleuthkitCase db) { + Map imgPaths = new HashMap<>(); + try { + Map> imgPathsList = db.getImagePaths(); + for (Map.Entry> entry : imgPathsList.entrySet()) { + if (entry.getValue().size() > 0) { + imgPaths.put(entry.getKey(), entry.getValue().get(0)); + } + } + } catch (TskCoreException ex) { + logger.log(Level.SEVERE, "Error getting image paths", ex); //NON-NLS + } + return imgPaths; + } + + /** + * Gets a reference to the main window of the desktop application to use to + * parent pop ups and initializes the application name for use in changing + * the main window title. MUST be called BEFORE any case is opened or + * created. + * + * @throws CaseActionException + */ + @Messages({ + "Case.exceptionMessage.cannotLocateMainWindow=Cannot locate main application window" + }) + private static void getMainWindowAndAppName() throws CaseActionException { + if (RuntimeProperties.runningWithGUI() && null == mainFrame) { + try { + SwingUtilities.invokeAndWait(() -> { + mainFrame = WindowManager.getDefault().getMainWindow(); + /* + * This is tricky and fragile. What looks like lazy + * initialization of the appName field is actually getting + * the application name from the main window title BEFORE a + * case has been opened and a case name has been included in + * the title. It is also very specific to the desktop GUI. + * + * TODO (JIRA-2231): Make the application name a + * RuntimeProperties item set by Installers. + */ + appName = mainFrame.getTitle(); + }); + } catch (InterruptedException | InvocationTargetException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(Bundle.Case_exceptionMessage_cannotLocateMainWindow()), ex); + } + } + } + + /** + * Deletes the case directory of a deleted case and removes the case form + * the Recent Cases menu. + * + * @param metadata The case metadata. + * @param progressIndicator A progress indicator. + */ + @Messages({ + "Case.progressMessage.deletingCaseDirectory=Deleting case directory..." + }) + private static void cleanupDeletedCase(CaseMetadata metadata, ProgressIndicator progressIndicator) { + /* + * Delete the case directory. + */ + progressIndicator.start(Bundle.Case_progressMessage_deletingCaseDirectory()); + if (!FileUtil.deleteDir(new File(metadata.getCaseDirectory()))) { + logger.log(Level.SEVERE, "Failed to fully delete case directory {0}", metadata.getCaseDirectory()); + } + + /* + * If running in a GUI, remove the case from the Recent Cases menu + */ + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> { + RecentCases.getInstance().removeRecentCase(metadata.getCaseDisplayName(), metadata.getFilePath().toString()); + }); + } + } + + /** + * Acquires an exclusive case name lock. + * + * @param caseName The case name (not the case display name, which can be + * changed by a user). + * + * @return The lock. + * + * @throws CaseActionException with a user-friendly message if the lock + * cannot be acquired. + */ + @Messages({"Case.creationException.couldNotAcquireNameLock=Failed to get lock on case name"}) + private static CoordinationService.Lock acquireExclusiveCaseNameLock(String caseName) throws CaseActionException { + try { + Lock lock = CoordinationService.getServiceForNamespace(CoordinationServiceNamespace.getRoot()).tryGetExclusiveLock(CoordinationService.CategoryNode.CASES, caseName, NAME_LOCK_TIMOUT_HOURS, TimeUnit.HOURS); + if (null == lock) { + throw new CaseActionException(Bundle.Case_creationException_couldNotAcquireNameLock()); + } + return lock; + + } catch (InterruptedException | CoordinationServiceException ex) { + throw new CaseActionException(Bundle.Case_creationException_couldNotAcquireNameLock(), ex); + } + } + + /** + * Acquires an exclusive case resources lock. + * + * @param caseName The case name (not the case display name, which can be + * changed by a user). + * + * @return The lock. + * + * @throws CaseActionException with a user-friendly message if the lock + * cannot be acquired. + */ + @Messages({"Case.creationException.couldNotAcquireResourcesLock=Failed to get lock on case resources"}) + private static CoordinationService.Lock acquireExclusiveCaseResourcesLock(String caseName) throws CaseActionException { + try { + String resourcesNodeName = caseName + "_resources"; + Lock lock = CoordinationService.getServiceForNamespace(CoordinationServiceNamespace.getRoot()).tryGetExclusiveLock(CoordinationService.CategoryNode.CASES, resourcesNodeName, RESOURCE_LOCK_TIMOUT_HOURS, TimeUnit.HOURS); + if (null == lock) { + throw new CaseActionException(Bundle.Case_creationException_couldNotAcquireResourcesLock()); + } + return lock; + + } catch (InterruptedException | CoordinationServiceException ex) { + throw new CaseActionException(Bundle.Case_creationException_couldNotAcquireResourcesLock(), ex); + } + } + + /** + * Update the GUI to to reflect the current case. + */ + private static void updateGUIForCaseOpened(Case newCurrentCase) { + SwingUtilities.invokeLater(() -> { + /* + * If the case database was upgraded for a new schema and a backup + * database was created, notify the user. + */ + SleuthkitCase caseDb = newCurrentCase.getSleuthkitCase(); + String backupDbPath = caseDb.getBackupDatabasePath(); + if (null != backupDbPath) { + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.msg", backupDbPath), + NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.title"), + JOptionPane.INFORMATION_MESSAGE); + } + + /* + * Look for the files for the data sources listed in the case + * database and give the user the opportunity to locate any that are + * missing. + */ + Map imgPaths = getImagePaths(caseDb); + for (Map.Entry entry : imgPaths.entrySet()) { + long obj_id = entry.getKey(); + String path = entry.getValue(); + boolean fileExists = (new File(path).isFile() || DriveUtils.driveExists(path)); + + if (!fileExists) { + int response = JOptionPane.showConfirmDialog( + WindowManager.getDefault().getMainWindow(), + NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.msg", appName, path), + NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.title"), + JOptionPane.YES_NO_OPTION); + if (response == JOptionPane.YES_OPTION) { + MissingImageDialog.makeDialog(obj_id, caseDb); + } else { + logger.log(Level.SEVERE, "User proceeding with missing image files"); //NON-NLS + + } + } + } + + /* + * Enable the case-specific actions. + */ + CallableSystemAction.get(AddImageAction.class + ).setEnabled(true); + CallableSystemAction + .get(CaseCloseAction.class + ).setEnabled(true); + CallableSystemAction + .get(CasePropertiesAction.class + ).setEnabled(true); + CallableSystemAction + .get(CaseDeleteAction.class + ).setEnabled(true); + CallableSystemAction + .get(OpenTimelineAction.class + ).setEnabled(true); + CallableSystemAction + .get(OpenOutputFolderAction.class + ).setEnabled(false); + + /* + * Add the case to the recent cases tracker that supplies a list of + * recent cases to the recent cases menu item and the open/create + * case dialog. + */ + RecentCases.getInstance().addRecentCase(newCurrentCase.getDisplayName(), newCurrentCase.getCaseMetadata().getFilePath().toString()); + + /* + * Open the top components (windows within the main application + * window). + */ + if (newCurrentCase.hasData()) { + CoreComponentControl.openCoreWindows(); + } + + /* + * Reset the main window title to be [curent case display name] - + * [application name], instead of just the application name. + */ + addCaseNameToMainWindowTitle(newCurrentCase.getDisplayName()); + }); + } + + /* + * Update the GUI to to reflect the lack of a current case. + */ + private static void updateGUIForCaseClosed() { + SwingUtilities.invokeLater(() -> { + + /* + * Close the top components (windows within the main application + * window). + */ + CoreComponentControl.closeCoreWindows(); + + /* + * Disable the case-specific menu items. + */ + CallableSystemAction + .get(AddImageAction.class + ).setEnabled(false); + CallableSystemAction + .get(CaseCloseAction.class + ).setEnabled(false); + CallableSystemAction + .get(CasePropertiesAction.class + ).setEnabled(false); + CallableSystemAction + .get(CaseDeleteAction.class + ).setEnabled(false); + CallableSystemAction + .get(OpenTimelineAction.class + ).setEnabled(false); + CallableSystemAction + .get(OpenOutputFolderAction.class + ).setEnabled(false); + + /* + * Clear the notifications in the notfier component in the lower + * right hand corner of the main application window. + */ + MessageNotifyUtil.Notify.clear(); + + /* + * Reset the main window title to be just the application name, + * instead of [curent case display name] - [application name]. + */ + Frame mainWindow = WindowManager.getDefault().getMainWindow(); + mainWindow.setTitle(appName); + }); + } + + /** + * Changes the title of the main window to include the case name. + * + * @param caseName The name of the case. + */ + private static void addCaseNameToMainWindowTitle(String caseName) { + if (!caseName.isEmpty()) { + Frame frame = WindowManager.getDefault().getMainWindow(); + frame.setTitle(caseName + " - " + appName); + } + } + + /** + * Empties the temp subdirectory for the current case. + */ + private static void clearTempSubDir(String tempSubDirPath) { + File tempFolder = new File(tempSubDirPath); + if (tempFolder.isDirectory()) { + File[] files = tempFolder.listFiles(); + if (files.length > 0) { + for (File file : files) { + if (file.isDirectory()) { + FileUtil.deleteDir(file); + } else { + file.delete(); + } + } + } + } + } + /** * Gets the case database. * * @return The case database. */ public SleuthkitCase getSleuthkitCase() { - return this.db; + return this.caseDb; } /** @@ -410,16 +1166,7 @@ public class Case implements SleuthkitCase.ErrorObserver { * @return The case services manager. */ public Services getServices() { - return services; - } - - /** - * Gets the case metadata. - * - * @return A CaseMetaData object. - */ - CaseMetadata getCaseMetadata() { - return caseMetadata; + return caseServices; } /** @@ -441,7 +1188,7 @@ public class Case implements SleuthkitCase.ErrorObserver { } /** - * Gets the case name. + * Gets the immutable case name. * * @return The case name. */ @@ -450,30 +1197,12 @@ public class Case implements SleuthkitCase.ErrorObserver { } /** - * Updates the case name. + * Gets the case name that can be changed by the user. * - * This should not be called from the EDT. - * - * @param oldCaseName The old case name. - * @param oldPath The old path name. - * @param newCaseName The new case name. - * @param newPath The new case path. + * @return The case display name. */ - void updateCaseName(String oldCaseName, String oldPath, String newCaseName, String newPath) throws CaseActionException { - try { - caseMetadata.setCaseName(newCaseName); - eventPublisher.publish(new AutopsyEvent(Events.NAME.toString(), oldCaseName, newCaseName)); - SwingUtilities.invokeLater(() -> { - try { - RecentCases.getInstance().updateRecentCase(oldCaseName, oldPath, newCaseName, newPath); // update the recent case - addCaseNameToMainWindowTitle(newCaseName); - } catch (Exception ex) { - Logger.getLogger(Case.class.getName()).log(Level.SEVERE, "Error updating case name in UI", ex); //NON-NLS - } - }); - } catch (Exception ex) { - throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.updateCaseName.exception.msg"), ex); - } + public String getDisplayName() { + return getCaseMetadata().getCaseDisplayName(); } /** @@ -601,20 +1330,6 @@ public class Case implements SleuthkitCase.ErrorObserver { } } - /** - * Gets the path to the specified subdirectory of the case directory, - * creating it if it does not already exist. - * - * @return The absolute path to the specified subdirectory. - */ - private String getOrCreateSubdirectory(String subDirectoryName) { - File subDirectory = Paths.get(getOutputDirectory(), subDirectoryName).toFile(); - if (!subDirectory.exists()) { - subDirectory.mkdirs(); - } - return subDirectory.toString(); - } - /** * Gets the data sources for the case. * @@ -625,7 +1340,7 @@ public class Case implements SleuthkitCase.ErrorObserver { * database. */ public List getDataSources() throws TskCoreException { - List list = db.getRootObjects(); + List list = caseDb.getRootObjects(); hasDataSources = (list.size() > 0); return list; } @@ -651,6 +1366,17 @@ public class Case implements SleuthkitCase.ErrorObserver { return timezones; } + /** + * Sets the name of the keyword search index for the case. + * + * @param textIndexName The text index name. + * + * @throws CaseMetadataException + */ + public void setTextIndexName(String textIndexName) throws CaseMetadataException { + getCaseMetadata().setTextIndexName(textIndexName); + } + /** * Gets the name of the keyword search index for the case. * @@ -783,7 +1509,7 @@ public class Case implements SleuthkitCase.ErrorObserver { String errorMsg = "Invalid local path provided: " + localPath; // NON-NLS throw new TskCoreException(errorMsg, ex); } - Report report = this.db.addReport(normalizedLocalPath, srcModuleName, reportName); + Report report = this.caseDb.addReport(normalizedLocalPath, srcModuleName, reportName); eventPublisher.publish(new ReportAddedEvent(report)); } @@ -796,7 +1522,7 @@ public class Case implements SleuthkitCase.ErrorObserver { * database. */ public List getAllReports() throws TskCoreException { - return this.db.getAllReports(); + return this.caseDb.getAllReports(); } /** @@ -809,30 +1535,968 @@ public class Case implements SleuthkitCase.ErrorObserver { */ public void deleteReports(Collection reports) throws TskCoreException { for (Report report : reports) { - this.db.deleteReport(report); + this.caseDb.deleteReport(report); eventPublisher.publish(new AutopsyEvent(Events.REPORT_DELETED.toString(), report, null)); } } /** - * Allows the case database to report internal error conditions in - * situations where throwing an exception is not appropriate. + * Gets the case metadata. * - * @param context The context of the error condition. - * @param errorMessage An error message. + * @return A CaseMetaData object. */ - @Override - public void receiveError(String context, String errorMessage) { - /* - * NOTE: We are accessing tskErrorReporter from two different threads. - * This is ok as long as we only read the value of tskErrorReporter - * because tskErrorReporter is declared as volatile. - */ - if (null != tskErrorReporter) { - tskErrorReporter.addProblems(context, errorMessage); + CaseMetadata getCaseMetadata() { + return caseMetadata; + } + + /** + * Updates the case display name name. + * + * @param oldCaseName The old case name. + * @param oldPath The old path name. + * @param newCaseName The new case name. + * @param newPath The new case path. + */ + void updateCaseName(String oldCaseName, String oldPath, String newCaseName, String newPath) throws CaseActionException { + try { + caseMetadata.setCaseDisplayName(newCaseName); + eventPublisher.publish(new AutopsyEvent(Events.NAME.toString(), oldCaseName, newCaseName)); + SwingUtilities.invokeLater(() -> { + try { + RecentCases.getInstance().updateRecentCase(oldCaseName, oldPath, newCaseName, newPath); + addCaseNameToMainWindowTitle(newCaseName); + + } catch (Exception ex) { + Logger.getLogger(Case.class + .getName()).log(Level.SEVERE, "Error updating case name in UI", ex); //NON-NLS + } + }); + } catch (CaseMetadataException ex) { + throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.updateCaseName.exception.msg"), ex); } } + /** + * Constructs an Autopsy case. + */ + private Case() { + } + + /** + * @param caseDir The full path of the case directory. The directory + * will be created if it doesn't already exist; if it + * exists, it is ASSUMED it was created by calling + * createCaseDirectory. + * @param caseDisplayName The display name of case, which may be changed + * later by the user. + * @param caseNumber The case number, can be the empty string. + * @param examiner The examiner to associate with the case, can be + * the empty string. + * @param caseType The type of case (single-user or multi-user). + * + * @throws CaseActionException if there is a problem creating the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + @Messages({ + "Case.exceptionMessage.illegalCaseName=Case name contains illegal characters.", + "Case.progressIndicatorTitle.creatingCase=Creating Case", + "Case.progressIndicatorCancelButton.label=Cancel", + "Case.progressMessage.preparing=Preparing...", + "Case.progressMessage.acquiringLocks=Acquiring locks..." + }) + private void open(String caseDir, String caseDisplayName, String caseNumber, String examiner, CaseType caseType) throws CaseActionException { + /* + * Clean up the display name for the case to make a suitable immutable + * case name. + */ + String caseName; + try { + caseName = sanitizeCaseName(caseDisplayName); + } catch (IllegalCaseNameException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(Bundle.Case_exceptionMessage_illegalCaseName()), ex); + } + + /* + * Set up either a GUI progress indicator or a logging progress + * indicator. + */ + final CancelButtonListener listener = new CancelButtonListener(); + ProgressIndicator progressIndicator; + if (RuntimeProperties.runningWithGUI()) { + progressIndicator = new ModalDialogProgressIndicator( + mainFrame, + Bundle.Case_progressIndicatorTitle_creatingCase(), + new String[]{Bundle.Case_progressIndicatorCancelButton_label()}, + Bundle.Case_progressIndicatorCancelButton_label(), + listener); + } else { + progressIndicator = new LoggingProgressIndicator(); + } + progressIndicator.start(Bundle.Case_progressMessage_preparing()); + + /* + * Creating a case is always done in the same non-UI thread that will be + * used later to close the case. If the case is a multi-user case, this + * ensures that case directory lock that is held as long as the case is + * open is released in the same thread in which it was acquired, as is + * required by the coordination service. + */ + caseLockingExecutor = Executors.newSingleThreadExecutor(); + Future future = caseLockingExecutor.submit(() -> { + if (CaseType.SINGLE_USER_CASE == caseType) { + open(caseDir, caseName, caseDisplayName, caseNumber, examiner, caseType, progressIndicator); + } else { + /* + * First, acquire an exclusive case name lock to prevent two + * nodes from creating the same case at the same time. + */ + progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks()); + try (CoordinationService.Lock nameLock = Case.acquireExclusiveCaseNameLock(caseName)) { + assert (null != nameLock); + /* + * Next, acquire a shared case directory lock that will be + * held as long as this node has this case open. This will + * prevent deletion of the case by another node. + */ + acquireSharedCaseDirLock(caseDir); + /* + * Finally, acquire an exclusive case resources lock to + * ensure only one node at a time can + * create/open/upgrade/close the case resources. + */ + try (CoordinationService.Lock resourcesLock = acquireExclusiveCaseResourcesLock(caseName)) { + assert (null != resourcesLock); + try { + open(caseDir, caseName, caseDisplayName, caseNumber, examiner, caseType, progressIndicator); + } catch (CaseActionException ex) { + /* + * Release the case directory lock immediately if + * there was a problem opening the case. + */ + if (CaseType.MULTI_USER_CASE == caseType) { + releaseSharedCaseDirLock(caseName); + } + throw ex; + } + } + } + } + return null; + }); + + /* + * If running with a GUI, give the future for the case creation task to + * the cancel button listener for the GUI progress indicator and make + * the progress indicator visible to the user. + */ + if (RuntimeProperties.runningWithGUI()) { + listener.setCaseActionFuture(future); + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(true)); + } + + /* + * Wait for the case creation task to finish. + */ + try { + future.get(); + + } catch (InterruptedException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getMessage()), ex); + } catch (ExecutionException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getCause().getMessage()), ex); + } catch (CancellationException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_cancelled(), ex); + } finally { + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(false)); + } + } + } + + /** + * Creates and opens a new case. + * + * @param caseDir The full path of the case directory. The directory + * will be created if it doesn't already exist; if it + * exists, it is ASSUMED it was created by calling + * createCaseDirectory. + * @param caseDisplayName The display name of case, which may be changed + * later by the user. + * @param caseNumber The case number, can be the empty string. + * @param examiner The examiner to associate with the case, can be + * the empty string. + * @param caseType The type of case (single-user or multi-user). + * + * @throws CaseActionException if there is a problem creating the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + @Messages({ + "Case.progressMessage.creatingCaseDirectory=Creating case directory...", + "Case.progressMessage.creatingCaseDatabase=Creating case database...", + "Case.progressMessage.creatingCaseMetadataFile=Creating case metadata file...", + "Case.exceptionMessage.couldNotCreateMetadataFile=Failed to create case metadata file.", + "Case.exceptionMessage.couldNotCreateCaseDatabase=Failed to create case database." + }) + private void open(String caseDir, String caseName, String caseDisplayName, String caseNumber, String examiner, CaseType caseType, ProgressIndicator progressIndicator) throws CaseActionException { + /* + * Create the case directory, if it does not already exist. + * + * TODO (JIRA-2180): The reason for this check for the existence of the + * case directory is not at all obvious. It reflects the assumption that + * if the case directory already exists, it is because the case is being + * created using the the "New Case" wizard, which separates the creation + * of the case directory from the creation of the case, with the idea + * that if the case directory cannot be created, the user can be asked + * to supply a different case directory path. This of course creates + * subtle and undetectable coupling between this code and the wizard + * code. The desired effect could be accomplished more simply and safely + * by having this method throw a specific exception to indicate that the + * case directory could not be created. In fact, a FEW specific + * exception types would in turn allow us to put localized, + * user-friendly messages in the GUI instead of putting user-friendly, + * localized messages in the exceptions, which causes them to appear in + * the application log, where it would be better to use English for + * readability by the broadest group of developers. + */ + progressIndicator.progress(Bundle.Case_progressMessage_creatingCaseDirectory()); + if (new File(caseDir).exists() == false) { + Case.createCaseDirectory(caseDir, caseType); + } + + /* + * Create the case database. + */ + progressIndicator.progress(Bundle.Case_progressMessage_creatingCaseDatabase()); + String dbName = null; + try { + if (CaseType.SINGLE_USER_CASE == caseType) { + /* + * For single-user cases, the case database is a SQLite database + * with a fixed name and is physically located in the root of + * the case directory. + */ + dbName = SINGLE_USER_CASE_DB_NAME; + this.caseDb = SleuthkitCase.newCase(Paths.get(caseDir, SINGLE_USER_CASE_DB_NAME).toString()); + } else if (CaseType.MULTI_USER_CASE == caseType) { + /* + * For multi-user cases, the case database is a PostgreSQL + * database with a name consiting of the case name with a time + * stamp suffix and is physically located on the database + * server. + */ + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); + Date date = new Date(); + dbName = caseName + "_" + dateFormat.format(date); + this.caseDb = SleuthkitCase.newCase(dbName, UserPreferences.getDatabaseConnectionInfo(), caseDir); + } + } catch (TskCoreException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotCreateCaseDatabase(), ex); + + } catch (UserPreferencesException ex) { + throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); + } + + /* + * Create the case metadata (.aut) file. + */ + progressIndicator.progress(Bundle.Case_progressMessage_creatingCaseMetadataFile()); + try { + this.caseMetadata = new CaseMetadata(caseDir, caseType, caseName, caseDisplayName, caseNumber, examiner, dbName); + } catch (CaseMetadataException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotCreateMetadataFile(), ex); + } + + openServices(progressIndicator); + } + + /** + * Opens an existing case. + * + * @param caseMetadataFilePath The apth to the case metadata file. + * + * @throws CaseActionException if there is a problem creating the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + private void open(Path caseMetadataFilePath) throws CaseActionException { + /* + * Read the contents of the case metadata file. + */ + try { + caseMetadata = new CaseMetadata(caseMetadataFilePath); + } catch (CaseMetadataException ex) { + throw new CaseActionException(Bundle.Case_openException_couldNotOpenCase(Bundle.Case_exceptionMessage_failedToReadMetadata()), ex); + } + + /* + * Set up either a GUI progress indicator or a logging progress + * indicator. + */ + CancelButtonListener listener = new CancelButtonListener(); + ProgressIndicator progressIndicator; + if (RuntimeProperties.runningWithGUI()) { + progressIndicator = new ModalDialogProgressIndicator( + mainFrame, + Bundle.Case_progressIndicatorTitle_openingCase(), + new String[]{Bundle.Case_progressIndicatorCancelButton_label()}, + Bundle.Case_progressIndicatorCancelButton_label(), + listener); + } else { + progressIndicator = new LoggingProgressIndicator(); + } + progressIndicator.start(Bundle.Case_progressMessage_preparing()); + + /* + * Opening the case in the same thread that will be used later to close + * the case. If the case is a multi-user case, this ensures that case + * directory lock that is held as long as the case is open is released + * in the same thread in which it was acquired, as is required by the + * coordination service. + */ + CaseType caseType = caseMetadata.getCaseType(); + String caseName = caseMetadata.getCaseName(); + progressIndicator.start(Bundle.Case_progressMessage_preparing()); + caseLockingExecutor = Executors.newSingleThreadExecutor(); + Future future = caseLockingExecutor.submit(() -> { + if (CaseType.SINGLE_USER_CASE == caseType) { + openCaseDatabase(progressIndicator); + openServices(progressIndicator); + } else { + /* + * First, acquire a shared case directory lock that will be held + * as long as this node has this case open, in order to prevent + * deletion of the case by another node. + */ + progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks()); + acquireSharedCaseDirLock(caseMetadata.getCaseDirectory()); + /* + * Next, acquire an exclusive case resources lock to ensure only + * one node at a time can create/open/upgrade/close case + * resources. + */ + try (CoordinationService.Lock resourcesLock = acquireExclusiveCaseResourcesLock(caseMetadata.getCaseName())) { + assert (null != resourcesLock); + try { + openCaseDatabase(progressIndicator); + openServices(progressIndicator); + } catch (CaseActionException ex) { + /* + * Release the case directory lock immediately if there + * was a problem opening the case. + */ + if (CaseType.MULTI_USER_CASE == caseType) { + releaseSharedCaseDirLock(caseName); + } + throw ex; + } + } + } + return null; + }); + + /* + * If running with a GUI, give the future for the case opening task to + * the cancel button listener for the GUI progress indicator and make + * the progress indicator visible to the user. + */ + if (RuntimeProperties.runningWithGUI()) { + listener.setCaseActionFuture(future); + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(true)); + } + + /* + * Wait for the case opening task to finish. + */ + try { + future.get(); + + } catch (InterruptedException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getMessage()), ex); + } catch (ExecutionException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getCause().getMessage()), ex); + } catch (CancellationException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_cancelled(), ex); + } finally { + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(false)); + } + } + } + + /** + * Opens an existing case database. + * + * @param progressIndicator A progress indicator. + * + * @throws CaseActionException if there is a problem opening the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + */ + @Messages({ + "Case.progressMessage.openingCaseDatabase=Opening case database...", + "Case.exceptionMessage.couldNotOpenCaseDatabase=Failed to open case database." + }) + private void openCaseDatabase(ProgressIndicator progressIndicator) throws CaseActionException { + /* + * Open the case database. + */ + try { + progressIndicator.progress(Bundle.Case_progressMessage_openingCaseDatabase()); + if (CaseType.SINGLE_USER_CASE == caseMetadata.getCaseType()) { + this.caseDb = SleuthkitCase.openCase(Paths.get(caseMetadata.getCaseDirectory(), caseMetadata.getCaseDatabaseName()).toString()); + } else if (UserPreferences.getIsMultiUserModeEnabled()) { + try { + this.caseDb = SleuthkitCase.openCase(caseMetadata.getCaseDatabaseName(), UserPreferences.getDatabaseConnectionInfo(), caseMetadata.getCaseDirectory()); + + } catch (UserPreferencesException ex) { + throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); + + } + } else { + throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.multiUserCaseNotEnabled")); + } + } catch (TskCoreException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotOpenCaseDatabase(), ex); + } + } + + /** + * Completes the case opening tasks common to both new cases and existing + * cases. + * + * @param progressIndicator A progress indicator. + * + * @throws CaseActionException + */ + @Messages({ + "Case.progressMessage.switchingLogDirectory=Switching log directory...", + "Case.progressMessage.settingUpTskErrorReporting=Setting up SleuthKit error reporting...", + "Case.progressMessage.openingCaseLevelServices=Opening case-level services...", + "Case.progressMessage.openingApplicationServiceResources=Opening application service case resources...", + "Case.progressMessage.settingUpNetworkCommunications=Setting up network communications...",}) + private void openServices(ProgressIndicator progressIndicator) throws CaseActionException { + /* + * Switch to writing to the application logs in the logs subdirectory. + */ + progressIndicator.progress(Bundle.Case_progressMessage_switchingLogDirectory()); + Logger.setLogDirectory(getLogDirectoryPath()); + + /* + * Hook up a SleuthKit layer error reporter. + */ + progressIndicator.progress(Bundle.Case_progressMessage_settingUpTskErrorReporting()); + + this.sleuthkitErrorReporter = new SleuthkitErrorReporter(MIN_SECS_BETWEEN_TSK_ERROR_REPORTS, NbBundle.getMessage(Case.class, "IntervalErrorReport.ErrorText")); + this.caseDb.addErrorObserver(this.sleuthkitErrorReporter); + + /* + * Clear the temp subdirectory. + */ + progressIndicator.progress(Bundle.Case_progressMessage_clearingTempDirectory()); + Case.clearTempSubDir(this.getTempDirectory()); + + /* + * Open the case-level services. + */ + progressIndicator.progress(Bundle.Case_progressMessage_openingCaseLevelServices()); + this.caseServices = new Services(this.caseDb); + + /* + * Allow any registered application services to open any resources + * specific to this case. + */ + progressIndicator.progress(Bundle.Case_progressMessage_openingApplicationServiceResources()); + openAppServiceCaseResources(); + + /* + * If this case is a multi-user case, set up for communication with + * other nodes. + */ + if (CaseType.MULTI_USER_CASE == this.caseMetadata.getCaseType()) { + progressIndicator.progress(Bundle.Case_progressMessage_settingUpNetworkCommunications()); + try { + eventPublisher.openRemoteEventChannel(String.format(EVENT_CHANNEL_NAME, this.getName())); + collaborationMonitor = new CollaborationMonitor(this.getName()); + } catch (AutopsyEventException | CollaborationMonitor.CollaborationMonitorException ex) { + /* + * The collaboration monitor and event channel are not + * essential. Log an error and notify the user, but do not + * throw. + */ + logger.log(Level.SEVERE, "Failed to setup network communications", ex); //NON-NLS + + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> MessageNotifyUtil.Notify.error(NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.Title"), NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.ErrMsg"))); + } + } + } + } + + /** + * Allows any registered application-level services to open any resources + * specific to this case. + * + * @throws CaseActionException + */ + @NbBundle.Messages({ + "# {0} - service name", "Case.serviceOpenCaseResourcesProgressIndicator.title={0} Opening Case Resources", + "# {0} - service name", "Case.servicesException.notificationTitle={0} Error", + "# {0} - service name", "Case.servicesException.serviceResourcesOpenCancelled=Opening case resources for {0} cancelled", + "# {0} - service name", "# {1} - exception message", "Case.servicesException.serviceResourcesOpenError=Could not open case resources for {0} service: {1}" + }) + private void openAppServiceCaseResources() throws CaseActionException { + /* + * Each service gets its own independently cancellable task, and thus + * its own task progress indicator. + */ + ExecutorService executor = Executors.newSingleThreadExecutor(); + + for (AutopsyService service : Lookup.getDefault().lookupAll(AutopsyService.class)) { + CancelButtonListener buttonListener = new CancelButtonListener(); + ProgressIndicator progressIndicator; + if (RuntimeProperties.runningWithGUI()) { + progressIndicator = new ModalDialogProgressIndicator( + mainFrame, + Bundle.Case_serviceOpenCaseResourcesProgressIndicator_title(service.getServiceName()), + new String[]{Bundle.Case_progressIndicatorCancelButton_label()}, + Bundle.Case_progressIndicatorCancelButton_label(), + buttonListener); + } else { + progressIndicator = new LoggingProgressIndicator(); + } + progressIndicator.start(Bundle.Case_progressMessage_preparing()); + + AutopsyService.CaseContext context = new AutopsyService.CaseContext(this, progressIndicator); + if (RuntimeProperties.runningWithGUI()) { + buttonListener.setCaseContext(context); + } + Future future = executor.submit(() -> { + service.openCaseResources(context); + return null; + }); + if (RuntimeProperties.runningWithGUI()) { + buttonListener.setCaseActionFuture(future); + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(true)); + } + try { + future.get(); + } catch (InterruptedException ex) { + Case.logger.log(Level.SEVERE, String.format("Unexpected interrupt while waiting on %s service to open case resources", service.getServiceName()), ex); + + } catch (CancellationException ex) { + /* + * The case-specific application service resources are not + * essential. Log an error and notify the user if running the + * desktop GUI, but do not throw. + */ + Case.logger.log(Level.WARNING, String.format("%s service opening of case resources cancelled", service.getServiceName())); + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> MessageNotifyUtil.Notify.warn( + Bundle.Case_servicesException_notificationTitle(service.getServiceName()), + Bundle.Case_servicesException_serviceResourcesOpenCancelled(service.getServiceName()))); + } + } catch (ExecutionException ex) { + /* + * The case-specific application service resources are not + * essential. Log an error and notify the user if running the + * desktop GUI, but do not throw. + */ + Case.logger.log(Level.SEVERE, String.format("%s service failed to open case resources", service.getServiceName()), ex); + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> MessageNotifyUtil.Notify.error( + Bundle.Case_servicesException_notificationTitle(service.getServiceName()), + Bundle.Case_servicesException_serviceResourcesOpenError(service.getServiceName(), ex.getLocalizedMessage()))); + } + } finally { + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(false)); + } + } + } + /* + * No tasks left, simply shut down the executor. + */ + executor.shutdown(); + } + + /** + * Closes the case. + * + * @param progressIndicator A progress indicator. + */ + @Messages({ + "Case.progressMessage.notifyingCaseEventSubscribers=Notifying case event subscribers...", + "Case.progressMessage.clearingTempDirectory=Clearing case temp directory...", + "Case.progressMessage.closingCaseLevelServices=Closing case-level services...", + "Case.progressMessage.closingApplicationServiceResources=Closing case-specific application service resources...", + "Case.progressMessage.tearingDownNetworkCommunications=Tearing down network communications...", + "Case.progressMessage.closingCaseDatabase=Closing case database...", + "Case.progressMessage.tearingDownTskErrorReporting=Tearing down SleuthKit error reporting..." + }) + + private void close() throws CaseActionException { + /* + * Set up either a GUI progress indicator or a logging progress + * indicator. + */ + ProgressIndicator progressIndicator; + if (RuntimeProperties.runningWithGUI()) { + progressIndicator = new ModalDialogProgressIndicator( + Case.mainFrame, + Bundle.Case_progressIndicatorTitle_closingCase()); + } else { + progressIndicator = new LoggingProgressIndicator(); + } + progressIndicator.start(Bundle.Case_progressMessage_preparing()); + + /* + * Closing a case is always done in the same non-UI thread that + * opened/created the case. If the case is a multi-user case, this + * ensures that case directory lock that is held as long as the case is + * open is released in the same thread in which it was acquired, as is + * required by the coordination service. + */ + Future future = caseLockingExecutor.submit(() -> { + if (CaseType.SINGLE_USER_CASE == caseMetadata.getCaseType()) { + close(progressIndicator); + } else { + String caseName = caseMetadata.getCaseName(); + /* + * Acquire an exclusive case resources lock to ensure only one + * node at a time can create/open/upgrade/close the case + * resources. + */ + progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks()); + try (CoordinationService.Lock resourcesLock = acquireExclusiveCaseResourcesLock(caseMetadata.getCaseName())) { + assert (null != resourcesLock); + close(progressIndicator); + } finally { + /* + * Always release the case directory lock that was acquired + * when the case was opened. + */ + releaseSharedCaseDirLock(caseName); + } + } + return null; + }); + + /* + * If running with a GUI, give the future for the case closing task to + * the cancel button listener for the GUI progress indicator and make + * the progress indicator visible to the user. + */ + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(true)); + } + + try { + logger.log(Level.INFO, "Closing case with metadata file path {0}", getCaseMetadata().getFilePath()); //NON-NLS + future.get(); + } catch (InterruptedException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getMessage()), ex); + } catch (ExecutionException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_wrapperMessage(ex.getCause().getMessage()), ex); + } catch (CancellationException ex) { + throw new CaseActionException(Bundle.Case_exceptionMessage_cancelled(), ex); + } finally { + caseLockingExecutor.shutdown(); + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(false)); + } + } + } + + private void close(ProgressIndicator progressIndicator) { + IngestManager.getInstance().cancelAllIngestJobs(IngestJob.CancellationReason.CASE_CLOSED); + + /* + * Stop sending/receiving case events to and from other nodes if this is + * a multi-user case. + */ + if (CaseType.MULTI_USER_CASE == caseMetadata.getCaseType()) { + progressIndicator.progress(Bundle.Case_progressMessage_tearingDownNetworkCommunications()); + if (null != collaborationMonitor) { + collaborationMonitor.shutdown(); + } + eventPublisher.closeRemoteEventChannel(); + } + + /* + * Allow all registered application services providers to close + * resources related to the case. + */ + progressIndicator.progress(Bundle.Case_progressMessage_closingApplicationServiceResources()); + closeAppServiceCaseResources(); + + /* + * Close the case-level services. + */ + progressIndicator.progress(Bundle.Case_progressMessage_closingCaseLevelServices()); + try { + this.caseServices.close(); + } catch (IOException ex) { + logger.log(Level.SEVERE, String.format("Error closing internal case services for %s at %s", this.getName(), this.getCaseDirectory()), ex); + } + + /* + * Close the case database + */ + progressIndicator.progress(Bundle.Case_progressMessage_closingCaseDatabase()); + caseDb.close(); + + /* + * Disconnect the SleuthKit layer error reporter. + */ + progressIndicator.progress(Bundle.Case_progressMessage_tearingDownTskErrorReporting()); + caseDb.removeErrorObserver(sleuthkitErrorReporter); + + /* + * Switch the log directory. + */ + progressIndicator.progress(Bundle.Case_progressMessage_switchingLogDirectory()); + Logger.setLogDirectory(PlatformUtil.getLogDirectory()); + } + + /** + * Allows any registered application-level services to close any resources + * specific to this case. + */ + @Messages({ + "# {0} - serviceName", "Case.serviceCloseResourcesProgressIndicator.title={0} Closing Case Resources", + "# {0} - service name", "# {1} - exception message", "Case.servicesException.serviceResourcesCloseError=Could not close case resources for {0} service: {1}" + }) + private void closeAppServiceCaseResources() { + /* + * Each service gets its own independently cancellable task, and thus + * its own task progress indicator. + */ + ExecutorService executor = Executors.newSingleThreadExecutor(); + + for (AutopsyService service : Lookup.getDefault().lookupAll(AutopsyService.class + )) { + ProgressIndicator progressIndicator; + if (RuntimeProperties.runningWithGUI()) { + progressIndicator = new ModalDialogProgressIndicator( + mainFrame, + Bundle.Case_serviceCloseResourcesProgressIndicator_title(service.getServiceName())); + } else { + progressIndicator = new LoggingProgressIndicator(); + } + progressIndicator.start(Bundle.Case_progressMessage_preparing()); + + AutopsyService.CaseContext context = new AutopsyService.CaseContext(this, progressIndicator); + Future future = executor.submit(() -> { + service.closeCaseResources(context); + return null; + }); + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(true)); + } + try { + future.get(); + } catch (InterruptedException ex) { + Case.logger.log(Level.SEVERE, String.format("Unexpected interrupt while waiting on %s service to close case resources", service.getServiceName()), ex); + + } catch (CancellationException ex) { + Case.logger.log(Level.SEVERE, String.format("Unexpected cancellation while waiting on %s service to close case resources", service.getServiceName()), ex); + + } catch (ExecutionException ex) { + Case.logger.log(Level.SEVERE, String.format("%s service failed to open case resources", service.getServiceName()), ex); + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> MessageNotifyUtil.Notify.error( + Bundle.Case_servicesException_notificationTitle(service.getServiceName()), + Bundle.Case_servicesException_serviceResourcesCloseError(service.getServiceName(), ex.getLocalizedMessage()))); + } + } finally { + if (RuntimeProperties.runningWithGUI()) { + SwingUtilities.invokeLater(() -> ((ModalDialogProgressIndicator) progressIndicator).setVisible(false)); + } + } + } + /* + * No tasks left, simply shut down the executor. + */ + executor.shutdown(); + } + + /** + * Acquires a shared case directory lock for the current case. + * + * @param caseDir The full path of the case directory. + * + * @throws CaseActionException with a user-friendly message if the lock + * cannot be acquired. + */ + @Messages({"Case.creationException.couldNotAcquireDirLock=Failed to get lock on case directory."}) + private void acquireSharedCaseDirLock(String caseDir) throws CaseActionException { + try { + caseDirLock = CoordinationService.getServiceForNamespace(CoordinationServiceNamespace.getRoot()).tryGetSharedLock(CoordinationService.CategoryNode.CASES, caseDir, SHARED_DIR_LOCK_TIMOUT_HOURS, TimeUnit.HOURS); + if (null == caseDirLock) { + throw new CaseActionException(Bundle.Case_creationException_couldNotAcquireDirLock()); + } + } catch (InterruptedException | CoordinationServiceException ex) { + throw new CaseActionException(Bundle.Case_creationException_couldNotAcquireNameLock(), ex); + } + } + + /** + * Releases a shared case directory lock for the current case. + * + * @param caseDir The full path of the case directory. + */ + private void releaseSharedCaseDirLock(String caseDir) { + if (caseDirLock != null) { + try { + caseDirLock.release(); + caseDirLock = null; + } catch (CoordinationService.CoordinationServiceException ex) { + logger.log(Level.SEVERE, String.format("Failed to release shared case directory lock for %s", caseDir), ex); + } + } + } + + /** + * Gets the path to the specified subdirectory of the case directory, + * creating it if it does not already exist. + * + * @return The absolute path to the specified subdirectory. + */ + private String getOrCreateSubdirectory(String subDirectoryName) { + File subDirectory = Paths.get(getOutputDirectory(), subDirectoryName).toFile(); + if (!subDirectory.exists()) { + subDirectory.mkdirs(); + } + return subDirectory.toString(); + + } + + private final static class CancelButtonListener implements ActionListener { + + private Future caseActionFuture; + private CaseContext caseContext; + + private void setCaseActionFuture(Future caseActionFuture) { + this.caseActionFuture = caseActionFuture; + } + + private void setCaseContext(CaseContext caseContext) { + this.caseContext = caseContext; + } + + @Override + public void actionPerformed(ActionEvent e) { + if (null != this.caseContext) { + this.caseContext.requestCancel(); + } + if (null != this.caseActionFuture) { + this.caseActionFuture.cancel(true); + } + } + + } + + /** + * An exception to throw when a case name with invalid characters is + * encountered. + */ + final static class IllegalCaseNameException extends Exception { + + private static final long serialVersionUID = 1L; + + /** + * Constructs an exception to throw when a case name with invalid + * characters is encountered. + * + * @param message The exception message. + */ + IllegalCaseNameException(String message) { + super(message); + } + + /** + * Constructs an exception to throw when a case name with invalid + * characters is encountered. + * + * @param message The exception message. + * @param cause The exceptin cause. + */ + IllegalCaseNameException(String message, Throwable cause) { + super(message, cause); + } + } + + /** + * Creates a new, single-user Autopsy case. + * + * @param caseDir The full path of the case directory. The directory + * will be created if it doesn't already exist; if it + * exists, it is ASSUMED it was created by calling + * createCaseDirectory. + * @param caseDisplayName The display name of case, which may be changed + * later by the user. + * @param caseNumber The case number, can be the empty string. + * @param examiner The examiner to associate with the case, can be + * the empty string. + * + * @throws CaseActionException if there is a problem creating the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + * @deprecated Use createAsCurrentCase instead. + */ + @Deprecated + public static void create(String caseDir, String caseDisplayName, String caseNumber, String examiner) throws CaseActionException { + createAsCurrentCase(caseDir, caseDisplayName, caseNumber, examiner, CaseType.SINGLE_USER_CASE); + } + + /** + * Creates a new Autopsy case and makes it the current case. + * + * @param caseDir The full path of the case directory. The directory + * will be created if it doesn't already exist; if it + * exists, it is ASSUMED it was created by calling + * createCaseDirectory. + * @param caseDisplayName The display name of case, which may be changed + * later by the user. + * @param caseNumber The case number, can be the empty string. + * @param examiner The examiner to associate with the case, can be + * the empty string. + * @param caseType The type of case (single-user or multi-user). + * + * @throws CaseActionException if there is a problem creating the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + * @deprecated Use createAsCurrentCase instead. + */ + @Deprecated + public static void create(String caseDir, String caseDisplayName, String caseNumber, String examiner, CaseType caseType) throws CaseActionException { + createAsCurrentCase(caseDir, caseDisplayName, caseNumber, examiner, caseType); + } + + /** + * Opens an existing Autopsy case and makes it the current case. + * + * @param caseMetadataFilePath The path of the case metadata (.aut) file. + * + * @throws CaseActionException if there is a problem opening the case. The + * exception will have a user-friendly message + * and may be a wrapper for a lower-level + * exception. + * @deprecated Use openAsCurrentCase instead. + */ + @Deprecated + public static void open(String caseMetadataFilePath) throws CaseActionException { + openAsCurrentCase(caseMetadataFilePath); + } + /** * Closes this Autopsy case. * @@ -840,834 +2504,11 @@ public class Case implements SleuthkitCase.ErrorObserver { * exception will have a user-friendly message * and may be a wrapper for a lower-level * exception. + * @deprecated Use closeCurrentCase instead. */ + @Deprecated public void closeCase() throws CaseActionException { - - // The unlock must happen on the same thread that created the lock - Future future = getCurrentCaseExecutor().submit(() -> { - try{ - if (currentCaseLock != null) { - currentCaseLock.release(); - currentCaseLock = null; - } - } catch (CoordinationService.CoordinationServiceException exx) { - logger.log(Level.SEVERE, String.format("Error releasing shared lock"), exx); - } - return null; - }); - try{ - future.get(); - } catch (InterruptedException | ExecutionException ex){ - logger.log(Level.SEVERE, String.format("Interrupted while releasing shared lock"), ex); - } - - changeCurrentCase(null); - - try { - services.close(); - this.db.close(); - } catch (Exception e) { - throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.closeCase.exception.msg"), e); - } - } - - /** - * Deletes the case folder for this Autopsy case and sets the current case - * to null. It does not not delete the case database for a multi-user case. - * - * @param caseDir The case directory to delete. - * - * @throws CaseActionException exception throw if case could not be deleted - */ - void deleteCase(File caseDir) throws CaseActionException { - logger.log(Level.INFO, "Deleting case.\ncaseDir: {0}", caseDir); //NON-NLS - - try { - boolean result = deleteCaseDirectory(caseDir); - - RecentCases.getInstance().removeRecentCase(this.caseMetadata.getCaseName(), this.caseMetadata.getFilePath().toString()); // remove it from the recent case - Case.changeCurrentCase(null); - if (result == false) { - throw new CaseActionException( - NbBundle.getMessage(this.getClass(), "Case.deleteCase.exception.msg", caseDir)); - } - - } catch (Exception ex) { - logger.log(Level.SEVERE, "Error deleting the current case dir: " + caseDir, ex); //NON-NLS - throw new CaseActionException( - NbBundle.getMessage(this.getClass(), "Case.deleteCase.exception.msg2", caseDir), ex); - } - } - - /** - * Gets the application name. - * - * @return The application name. - */ - public static String getAppName() { - if ((appName == null) || appName.equals("")) { - appName = WindowManager.getDefault().getMainWindow().getTitle(); - } - return appName; - } - - /** - * Checks if a string is a valid case name. - * - * TODO( AUT-2221): This should incorporate the vlaidity checks of - * sanitizeCaseName. - * - * @param caseName The candidate string. - * - * @return True or false. - */ - public static boolean isValidName(String caseName) { - return !(caseName.contains("\\") || caseName.contains("/") || caseName.contains(":") - || caseName.contains("*") || caseName.contains("?") || caseName.contains("\"") - || caseName.contains("<") || caseName.contains(">") || caseName.contains("|")); - } - - /** - * Creates a new single-user Autopsy case. - * - * @param caseDir The full path of the case directory. It will be created - * if it doesn't already exist; if it exists, it should - * have been created using Case.createCaseDirectory to - * ensure that the required sub-directories were created. - * @param caseName The name of case. - * @param caseNumber The case number, can be the empty string. - * @param examiner The examiner to associate with the case, can be the - * empty string. - * - * @throws CaseActionException if there is a problem creating the case. The - * exception will have a user-friendly message - * and may be a wrapper for a lower-level - * exception. - */ - public static void create(String caseDir, String caseName, String caseNumber, String examiner) throws CaseActionException { - create(caseDir, caseName, caseNumber, examiner, CaseType.SINGLE_USER_CASE); - } - - /** - * Creates a new Autopsy case. - * - * @param caseDir The full path of the case directory. It will be created - * if it doesn't already exist; if it exists, it should - * have been created using Case.createCaseDirectory() to - * ensure that the required sub-directories were created. - * @param caseName The name of case. - * @param caseNumber The case number, can be the empty string. - * @param examiner The examiner to associate with the case, can be the - * empty string. - * @param caseType The type of case (single-user or multi-user). - * - * @throws CaseActionException if there is a problem creating the case. The - * exception will have a user-friendly message - * and may be a wrapper for a lower-level - * exception. - */ - @Messages({"Case.creationException=Could not create case: failed to create case metadata file."}) - public static void create(String caseDir, String caseName, String caseNumber, String examiner, CaseType caseType) throws CaseActionException { - logger.log(Level.INFO, "Attempting to create case {0} in directory = {1}", new Object[]{caseName, caseDir}); //NON-NLS - - CoordinationService.Lock exclusiveResourceLock = null; - boolean caseCreatedSuccessfully = false; - - /* - * Create case directory if it doesn't already exist. - */ - if (new File(caseDir).exists() == false) { - Case.createCaseDirectory(caseDir, caseType); - } - - /* - * Sanitize the case name, create a unique keyword search index name, - * and create a standard (single-user) or unique (multi-user) case - * database name. - */ - String santizedCaseName = sanitizeCaseName(caseName); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); - Date date = new Date(); - String indexName = santizedCaseName + "_" + dateFormat.format(date); - String dbName = null; - if (caseType == CaseType.SINGLE_USER_CASE) { - dbName = caseDir + File.separator + "autopsy.db"; //NON-NLS - } else if (caseType == CaseType.MULTI_USER_CASE) { - dbName = indexName; - } - - try{ - /* If this is a multi-user case, acquire two locks: - * - a shared lock on the case to prevent it from being deleted while open - * - an exclusive lock to prevent multiple clients from executing openCase simultaneously - */ - if(caseType == CaseType.MULTI_USER_CASE){ - try{ - - // The shared lock uses case directory - // The shared lock needs to be created on a special thread so it can be released - // from the same thread. - Future future = getCurrentCaseExecutor().submit(() -> { - currentCaseLock = CoordinationService.getInstance(CoordinationServiceNamespace.getRoot()).tryGetSharedLock(CoordinationService.CategoryNode.CASES, caseDir); - if (null == currentCaseLock) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.exception.errorLocking", CaseMetadata.getFileExtension())); - } - return null; - }); - future.get(); - - // The exclusive lock uses the unique case name. - // This lock does not need to be on a special thread since it will be released before - // leaving this method - exclusiveResourceLock = CoordinationService.getInstance(CoordinationServiceNamespace.getRoot()).tryGetExclusiveLock(CoordinationService.CategoryNode.RESOURCE, - dbName, 12, TimeUnit.HOURS); - if (null == exclusiveResourceLock) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.exception.errorLocking", CaseMetadata.getFileExtension())); - } - } catch (Exception ex){ - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.exception.errorLocking", CaseMetadata.getFileExtension())); - } - } - - /* - * Create the case metadata (.aut) file. - */ - CaseMetadata metadata; - try { - metadata = new CaseMetadata(caseDir, caseType, caseName, caseNumber, examiner, dbName, indexName); - } catch (CaseMetadataException ex) { - throw new CaseActionException(Bundle.Case_creationException(), ex); - } - - /* - * Create the case database. - */ - SleuthkitCase db = null; - try { - if (caseType == CaseType.SINGLE_USER_CASE) { - db = SleuthkitCase.newCase(dbName); - } else if (caseType == CaseType.MULTI_USER_CASE) { - db = SleuthkitCase.newCase(dbName, UserPreferences.getDatabaseConnectionInfo(), caseDir); - } - } catch (TskCoreException ex) { - logger.log(Level.SEVERE, String.format("Error creating a case %s in %s ", caseName, caseDir), ex); //NON-NLS - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - }); - /* - * SleuthkitCase.newCase throws TskCoreExceptions with user-friendly - * messages, so propagate the exception message. - */ - throw new CaseActionException(ex.getMessage(), ex); //NON-NLS - } catch (UserPreferencesException ex) { - logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - }); - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); - } - - Case newCase = new Case(metadata, db); - changeCurrentCase(newCase); - caseCreatedSuccessfully = true; - - logger.log(Level.INFO, "Created case {0} in directory = {1}", new Object[]{caseName, caseDir}); //NON-NLS - } finally { - // Release the exclusive resource lock - try { - if (exclusiveResourceLock != null) { - exclusiveResourceLock.release(); - } - } catch (CoordinationService.CoordinationServiceException exx) { - logger.log(Level.SEVERE, String.format("Error releasing resource lock for case {0}", caseName), exx); - } - - // If an error occurred while opening the case, release the shared case lock as well - if(! caseCreatedSuccessfully){ - Future future = getCurrentCaseExecutor().submit(() -> { - try { - if (currentCaseLock != null) { - currentCaseLock.release(); - currentCaseLock = null; - } - } catch (CoordinationService.CoordinationServiceException exx) { - logger.log(Level.SEVERE, String.format("Error releasing shared lock for case {0}", caseName), exx); - } - return null; - }); - try{ - future.get(); - } catch (InterruptedException | ExecutionException ex){ - logger.log(Level.SEVERE, String.format("Interrupted while releasing shared lock"), ex); - } - } - } - } - - /** - * Sanitizes the case name for PostgreSQL database, Solr cores, and ActiveMQ - * topics. Makes it plain-vanilla enough that each item should be able to - * use it. - * - * Solr: - * http://stackoverflow.com/questions/29977519/what-makes-an-invalid-core-name - * may not be / \ : - * - * ActiveMQ: - * http://activemq.2283324.n4.nabble.com/What-are-limitations-restrictions-on-destination-name-td4664141.html - * may not be ? - * - * PostgreSQL: - * http://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html 63 - * chars max, must start with a-z or _ following chars can be letters _ or - * digits - * - * SQLite: Uses autopsy.db for the database name and follows the Windows - * naming convention - * - * @param caseName A candidate case name. - * - * @return The sanitized case name. - */ - static String sanitizeCaseName(String caseName) { - - String result; - - // Remove all non-ASCII characters - result = caseName.replaceAll("[^\\p{ASCII}]", "_"); //NON-NLS - - // Remove all control characters - result = result.replaceAll("[\\p{Cntrl}]", "_"); //NON-NLS - - // Remove / \ : ? space ' " - result = result.replaceAll("[ /?:'\"\\\\]", "_"); //NON-NLS - - // Make it all lowercase - result = result.toLowerCase(); - - // Must start with letter or underscore for PostgreSQL. If not, prepend an underscore. - if (result.length() > 0 && !(Character.isLetter(result.codePointAt(0))) && !(result.codePointAt(0) == '_')) { - result = "_" + result; - } - - // Chop to 63-16=47 left (63 max for PostgreSQL, taking 16 for the date _20151225_123456) - if (result.length() > MAX_SANITIZED_CASE_NAME_LEN) { - result = result.substring(0, MAX_SANITIZED_CASE_NAME_LEN); - } - - if (result.isEmpty()) { - result = "case"; //NON-NLS - } - - return result; - } - - /** - * Creates a case directory and its subdirectories. - * - * @param caseDir Path to the case directory (typically base + case name). - * @param caseType The type of case, single-user or multi-user. - * - * @throws CaseActionException throw if could not create the case dir - */ - static void createCaseDirectory(String caseDir, CaseType caseType) throws CaseActionException { - - File caseDirF = new File(caseDir); - if (caseDirF.exists()) { - if (caseDirF.isFile()) { - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.existNotDir", caseDir)); - } else if (!caseDirF.canRead() || !caseDirF.canWrite()) { - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.existCantRW", caseDir)); - } - } - - try { - boolean result = (caseDirF).mkdirs(); // create root case Directory - if (result == false) { - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreate", caseDir)); - } - - // create the folders inside the case directory - String hostClause = ""; - - if (caseType == CaseType.MULTI_USER_CASE) { - hostClause = File.separator + NetworkUtils.getLocalHostName(); - } - result = result && (new File(caseDir + hostClause + File.separator + EXPORT_FOLDER)).mkdirs() - && (new File(caseDir + hostClause + File.separator + LOG_FOLDER)).mkdirs() - && (new File(caseDir + hostClause + File.separator + TEMP_FOLDER)).mkdirs() - && (new File(caseDir + hostClause + File.separator + CACHE_FOLDER)).mkdirs(); - - if (result == false) { - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateCaseDir", caseDir)); - } - - final String modulesOutDir = caseDir + hostClause + File.separator + MODULE_FOLDER; - result = new File(modulesOutDir).mkdir(); - if (result == false) { - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateModDir", - modulesOutDir)); - } - - final String reportsOutDir = caseDir + hostClause + File.separator + REPORTS_FOLDER; - result = new File(reportsOutDir).mkdir(); - if (result == false) { - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateReportsDir", - modulesOutDir)); - } - - } catch (Exception e) { - throw new CaseActionException( - NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.gen", caseDir), e); - } - } - - /** - * Opens an existing Autopsy case. - * - * @param caseMetadataFilePath The path of the case metadata (.aut) file. - * - * @throws CaseActionException if there is a problem opening the case. The - * exception will have a user-friendly message - * and may be a wrapper for a lower-level - * exception. - */ - public static void open(String caseMetadataFilePath) throws CaseActionException { - logger.log(Level.INFO, "Opening case with metadata file path {0}", caseMetadataFilePath); //NON-NLS - CoordinationService.Lock exclusiveResourceLock = null; - boolean caseOpenedSuccessfully = false; - - /* - * Verify the extension of the case metadata file. - */ - if (!caseMetadataFilePath.endsWith(CaseMetadata.getFileExtension())) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.checkFile.msg", CaseMetadata.getFileExtension())); - } - - try { - /* - * Get the case metadata required to open the case database. - */ - CaseMetadata metadata = new CaseMetadata(Paths.get(caseMetadataFilePath)); - CaseType caseType = metadata.getCaseType(); - - /* - * If this is a multi-user case, acquire two locks: - * - a shared lock on the case to prevent it from being deleted while open - * - an exclusive lock to prevent multiple clients from executing openCase simultaneously - */ - if(caseType == CaseType.MULTI_USER_CASE){ - try{ - - // The shared lock uses the case directory - // The shared lock needs to be created on a special thread so it can be released - // from the same thread. - Future future = getCurrentCaseExecutor().submit(() -> { - currentCaseLock = CoordinationService.getInstance(CoordinationServiceNamespace.getRoot()).tryGetSharedLock(CoordinationService.CategoryNode.CASES, metadata.getCaseDirectory()); - if (null == currentCaseLock) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.exception.errorLocking", CaseMetadata.getFileExtension())); - } - return null; - }); - future.get(); - - // The exclusive lock uses the unique case name - // This lock does not need to be on a special thread since it will be released before - // leaving this method - exclusiveResourceLock = CoordinationService.getInstance(CoordinationServiceNamespace.getRoot()).tryGetExclusiveLock(CoordinationService.CategoryNode.RESOURCE, - metadata.getCaseDatabaseName(), 12, TimeUnit.HOURS); - if (null == exclusiveResourceLock) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.exception.errorLocking", CaseMetadata.getFileExtension())); - } - } catch (Exception ex){ - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.exception.errorLocking", CaseMetadata.getFileExtension())); - } - } - - /* - * Open the case database. - */ - SleuthkitCase db; - if (caseType == CaseType.SINGLE_USER_CASE) { - String dbPath = metadata.getCaseDatabasePath(); //NON-NLS - db = SleuthkitCase.openCase(dbPath); - } else { - if (!UserPreferences.getIsMultiUserModeEnabled()) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.multiUserCaseNotEnabled")); - } - try { - db = SleuthkitCase.openCase(metadata.getCaseDatabaseName(), UserPreferences.getDatabaseConnectionInfo(), metadata.getCaseDirectory()); - } catch (UserPreferencesException ex) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); - } - } - - /* - * Check for the presence of the UI and do things that can only be - * done with user interaction. - */ - if (RuntimeProperties.coreComponentsAreActive()) { - /* - * If the case database was upgraded for a new schema, notify - * the user. - */ - if (null != db.getBackupDatabasePath()) { - SwingUtilities.invokeLater(() -> { - JOptionPane.showMessageDialog( - WindowManager.getDefault().getMainWindow(), - NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.msg", db.getBackupDatabasePath()), - NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.title"), - JOptionPane.INFORMATION_MESSAGE); - }); - } - - /* - * Look for the files for the data sources listed in the case - * database and give the user the opportunity to locate any that - * are missing. - */ - Map imgPaths = getImagePaths(db); - for (Map.Entry entry : imgPaths.entrySet()) { - long obj_id = entry.getKey(); - String path = entry.getValue(); - boolean fileExists = (new File(path).isFile() || driveExists(path)); - if (!fileExists) { - int ret = JOptionPane.showConfirmDialog( - WindowManager.getDefault().getMainWindow(), - NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.msg", getAppName(), path), - NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.title"), - JOptionPane.YES_NO_OPTION); - if (ret == JOptionPane.YES_OPTION) { - MissingImageDialog.makeDialog(obj_id, db); - } else { - logger.log(Level.WARNING, "Selected image files don't match old files!"); //NON-NLS - } - } - } - } - Case openedCase = new Case(metadata, db); - changeCurrentCase(openedCase); - caseOpenedSuccessfully = true; - - } catch (CaseMetadataException ex) { - throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.metaDataFileCorrupt.exception.msg"), ex); //NON-NLS - } catch (TskCoreException ex) { - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - }); - /* - * SleuthkitCase.openCase throws TskCoreExceptions with - * user-friendly messages, so propagate the exception message. - */ - throw new CaseActionException(ex.getMessage(), ex); - } finally { - // Release the exclusive resource lock - try { - if (exclusiveResourceLock != null) { - exclusiveResourceLock.release(); - exclusiveResourceLock = null; - } - } catch (CoordinationService.CoordinationServiceException exx) { - logger.log(Level.SEVERE, String.format("Error releasing resource lock for case {0}", caseMetadataFilePath), exx); - } - - // If an error occurred while opening the case, release the shared case lock as well - if(! caseOpenedSuccessfully){ - Future future = getCurrentCaseExecutor().submit(() -> { - try { - if (currentCaseLock != null) { - currentCaseLock.release(); - currentCaseLock = null; - } - } catch (CoordinationService.CoordinationServiceException exx) { - logger.log(Level.SEVERE, String.format("Error releasing shared lock for case {0}", caseMetadataFilePath), exx); - } - return null; - }); - try{ - future.get(); - } catch (InterruptedException | ExecutionException ex){ - logger.log(Level.SEVERE, String.format("Interrupted while releasing shared lock"), ex); - } - } - } - } - - /** - * Gets the paths of data sources that are images. - * - * @param db A case database. - * - * @return A mapping of object ids to image paths. - */ - static Map getImagePaths(SleuthkitCase db) { - Map imgPaths = new HashMap<>(); - try { - Map> imgPathsList = db.getImagePaths(); - for (Map.Entry> entry : imgPathsList.entrySet()) { - if (entry.getValue().size() > 0) { - imgPaths.put(entry.getKey(), entry.getValue().get(0)); - } - } - } catch (TskException ex) { - logger.log(Level.SEVERE, "Error getting image paths", ex); //NON-NLS - } - return imgPaths; - } - - /** - * Updates the current case to the given case, firing property change events - * and updating the UI. - * - * @param newCase The new current case or null if there is no new current - * case. - */ - private static void changeCurrentCase(Case newCase) { - // close the existing case - Case oldCase = Case.currentCase; - Case.currentCase = null; - if (oldCase != null) { - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - }); - IngestManager.getInstance().cancelAllIngestJobs(IngestJob.CancellationReason.CASE_CLOSED); - completeCaseChange(null); //closes windows, etc - if (null != oldCase.tskErrorReporter) { - oldCase.tskErrorReporter.shutdown(); // stop listening for TSK errors for the old case - oldCase.tskErrorReporter = null; - } - eventPublisher.publishLocally(new AutopsyEvent(Events.CURRENT_CASE.toString(), oldCase, null)); - if (CaseType.MULTI_USER_CASE == oldCase.getCaseType()) { - if (null != oldCase.collaborationMonitor) { - oldCase.collaborationMonitor.shutdown(); - } - eventPublisher.closeRemoteEventChannel(); - } - } - - if (newCase != null) { - currentCase = newCase; - Logger.setLogDirectory(currentCase.getLogDirectoryPath()); - // sanity check - if (null != currentCase.tskErrorReporter) { - currentCase.tskErrorReporter.shutdown(); - } - // start listening for TSK errors for the new case - currentCase.tskErrorReporter = new IntervalErrorReportData(currentCase, MIN_SECS_BETWEEN_TSK_ERROR_REPORTS, - NbBundle.getMessage(Case.class, "IntervalErrorReport.ErrorText")); - completeCaseChange(currentCase); - SwingUtilities.invokeLater(() -> { - RecentCases.getInstance().addRecentCase(currentCase.getName(), currentCase.getCaseMetadata().getFilePath().toString()); // update the recent cases - }); - if (CaseType.MULTI_USER_CASE == newCase.getCaseType()) { - try { - /** - * Use the text index name as the remote event channel name - * prefix since it is unique, the same as the case database - * name for a multiuser case, and is readily available - * through the Case.getTextIndexName() API. - */ - eventPublisher.openRemoteEventChannel(String.format(EVENT_CHANNEL_NAME, newCase.getTextIndexName())); - currentCase.collaborationMonitor = new CollaborationMonitor(); - } catch (AutopsyEventException | CollaborationMonitor.CollaborationMonitorException ex) { - logger.log(Level.SEVERE, "Failed to setup for collaboration", ex); //NON-NLS - MessageNotifyUtil.Notify.error(NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.Title"), NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.ErrMsg")); - } - } - eventPublisher.publishLocally(new AutopsyEvent(Events.CURRENT_CASE.toString(), null, currentCase)); - - } else { - Logger.setLogDirectory(PlatformUtil.getLogDirectory()); - } - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - }); - } - - /** - * Updates the UI and does miscellaneous other things to complete changing - * the current case. - * - * @param newCase The new current case or null if there is no new current - * case. - */ - private static void completeCaseChange(Case newCase) { - logger.log(Level.INFO, "Changing Case to: {0}", newCase); //NON-NLS - if (newCase != null) { // new case is open - - // clear the temp folder when the case is created / opened - Case.clearTempFolder(); - - if (RuntimeProperties.coreComponentsAreActive()) { - // enable these menus - SwingUtilities.invokeLater(() -> { - CallableSystemAction.get(AddImageAction.class).setEnabled(true); - CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); - CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); - CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu - CallableSystemAction.get(OpenTimelineAction.class).setEnabled(true); - - if (newCase.hasData()) { - // open all top components - CoreComponentControl.openCoreWindows(); - } else { - // close all top components - CoreComponentControl.closeCoreWindows(); - } - addCaseNameToMainWindowTitle(currentCase.getName()); - }); - } else { - SwingUtilities.invokeLater(() -> { - Frame f = WindowManager.getDefault().getMainWindow(); - f.setTitle(getAppName()); // set the window name to just application name - }); - } - - } else { // case is closed - SwingUtilities.invokeLater(() -> { - if (RuntimeProperties.coreComponentsAreActive()) { - - // close all top components first - CoreComponentControl.closeCoreWindows(); - - // disable these menus - CallableSystemAction.get(AddImageAction.class).setEnabled(false); // Add Image menu - CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); // Case Close menu - CallableSystemAction.get(CasePropertiesAction.class).setEnabled(false); // Case Properties menu - CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); // Delete Case menu - CallableSystemAction.get(OpenTimelineAction.class).setEnabled(false); - } - - //clear pending notifications - MessageNotifyUtil.Notify.clear(); - Frame f = WindowManager.getDefault().getMainWindow(); - f.setTitle(getAppName()); // set the window name to just application name - }); - - //try to force gc to happen - System.gc(); - System.gc(); - } - - //log memory usage after case changed - logger.log(Level.INFO, PlatformUtil.getAllMemUsageInfo()); - - } - - /** - * Empties the temp subdirectory for the current case. - */ - private static void clearTempFolder() { - File tempFolder = new File(currentCase.getTempDirectory()); - if (tempFolder.isDirectory()) { - File[] files = tempFolder.listFiles(); - if (files.length > 0) { - for (File file : files) { - if (file.isDirectory()) { - deleteCaseDirectory(file); - } else { - file.delete(); - } - } - } - } - } - - /** - * Changes the title of the main window to include the case name. - * - * @param newCaseName The name of the case. - */ - private static void addCaseNameToMainWindowTitle(String newCaseName) { - if (!newCaseName.equals("")) { - Frame f = WindowManager.getDefault().getMainWindow(); - f.setTitle(newCaseName + " - " + getAppName()); - } - } - - /** - * Deletes a case directory. - * - * @param casePath A case directory path. - * - * @return True if the deletion succeeded, false otherwise. - */ - static boolean deleteCaseDirectory(File casePath) { - logger.log(Level.INFO, "Deleting case directory: {0}", casePath.getAbsolutePath()); //NON-NLS - return FileUtil.deleteDir(casePath); - } - - /** - * Get the single thread executor for the current case, creating it if necessary. - * @return The executor - */ - private static ExecutorService getCurrentCaseExecutor(){ - if(currentCaseExecutor == null){ - currentCaseExecutor = Executors.newSingleThreadExecutor(); - } - return currentCaseExecutor; - } - - /** - * Gets the time zone(s) of the image data source(s) in this case. - * - * @return The set of time zones in use. - * - * @deprecated Use getTimeZones instead. - */ - @Deprecated - public Set getTimeZone() { - return getTimeZones(); - } - - /** - * Determines whether or not a given path is for a physical drive. - * - * @param path The path to test. - * - * @return True or false. - * - * @deprecated Use - * org.sleuthkit.autopsy.coreutils.DriveUtils.isPhysicalDrive instead. - */ - @Deprecated - static boolean isPhysicalDrive(String path) { - return DriveUtils.isPhysicalDrive(path); - } - - /** - * Determines whether or not a given path is for a local drive or partition. - * - * @param path The path to test. - * - * @deprecated Use org.sleuthkit.autopsy.coreutils.DriveUtils.isPartition - * instead. - */ - @Deprecated - static boolean isPartition(String path) { - return DriveUtils.isPartition(path); - } - - /** - * Determines whether or not a drive exists by eading the first byte and - * checking if it is a -1. - * - * @param path The path to test. - * - * @return True or false. - * - * @deprecated Use org.sleuthkit.autopsy.coreutils.DriveUtils.driveExists - * instead. - */ - @Deprecated - static boolean driveExists(String path) { - return DriveUtils.driveExists(path); + closeCurrentCase(); } /** @@ -1725,21 +2566,6 @@ public class Case implements SleuthkitCase.ErrorObserver { return Version.getVersion(); } - /** - * Creates an Autopsy case directory. - * - * @param caseDir Path to the case directory (typically base + case name) - * @param caseName the case name (used only for error messages) - * - * @throws CaseActionException - * @Deprecated Use createCaseDirectory(String caseDir, CaseType caseType) - * instead - */ - @Deprecated - static void createCaseDirectory(String caseDir, String caseName) throws CaseActionException { - createCaseDirectory(caseDir, CaseType.SINGLE_USER_CASE); - } - /** * Check if case is currently open. * @@ -1749,20 +2575,7 @@ public class Case implements SleuthkitCase.ErrorObserver { */ @Deprecated public static boolean existsCurrentCase() { - return currentCase != null; - } - - /** - * Get module output directory path where modules should save their - * permanent data. - * - * @return absolute path to the module output directory - * - * @deprecated Use getModuleDirectory() instead. - */ - @Deprecated - public String getModulesOutputDirAbsPath() { - return getModuleDirectory(); + return isCaseOpen(); } /** @@ -1789,20 +2602,23 @@ public class Case implements SleuthkitCase.ErrorObserver { * @deprecated Do not use. */ @Deprecated - public static PropertyChangeSupport getPropertyChangeSupport() { - return new PropertyChangeSupport(Case.class); + public static PropertyChangeSupport + getPropertyChangeSupport() { + return new PropertyChangeSupport(Case.class + ); } /** - * Gets the full path to the case metadata file for this case. + * Get module output directory path where modules should save their + * permanent data. * - * @return configFilePath The case metadata file path. + * @return absolute path to the module output directory * - * @deprecated Use getCaseMetadata and CaseMetadata.getFilePath instead. + * @deprecated Use getModuleDirectory() instead. */ @Deprecated - String getConfigFilePath() { - return getCaseMetadata().getFilePath().toString(); + public String getModulesOutputDirAbsPath() { + return getModuleDirectory(); } /** @@ -1813,32 +2629,33 @@ public class Case implements SleuthkitCase.ErrorObserver { * @param imgId The ID of the image. * @param timeZone The time zone of the image. * + * @return + * + * @throws org.sleuthkit.autopsy.casemodule.CaseActionException + * * @deprecated As of release 4.0 */ @Deprecated public Image addImage(String imgPath, long imgId, String timeZone) throws CaseActionException { try { - Image newDataSource = db.getImageById(imgId); + Image newDataSource = caseDb.getImageById(imgId); notifyDataSourceAdded(newDataSource, UUID.randomUUID()); return newDataSource; - } catch (Exception ex) { + } catch (TskCoreException ex) { throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.addImg.exception.msg"), ex); } } /** - * Finishes adding new local data source to the case. Sends out event and - * reopens windows if needed. + * Gets the time zone(s) of the image data source(s) in this case. * - * @param newDataSource new data source added + * @return The set of time zones in use. * - * @deprecated As of release 4.0, replaced by {@link #notifyAddingDataSource(java.util.UUID) and - * {@link #notifyDataSourceAdded(org.sleuthkit.datamodel.Content, java.util.UUID) and - * {@link #notifyFailedAddingDataSource(java.util.UUID)} + * @deprecated Use getTimeZones instead. */ @Deprecated - void addLocalDataSource(Content newDataSource) { - notifyDataSourceAdded(newDataSource, UUID.randomUUID()); + public Set getTimeZone() { + return getTimeZones(); } /** @@ -1856,7 +2673,4 @@ public class Case implements SleuthkitCase.ErrorObserver { deleteReports(reports); } - @Deprecated - public static final String propStartup = "LBL_StartupDialog"; //NON-NLS - } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java index 86cc38c251..19dc651f9a 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,31 +19,33 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Component; +import java.awt.Cursor; import java.awt.event.ActionEvent; +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; import javax.swing.Action; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.SwingWorker; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; -import org.openide.util.actions.CallableSystemAction; -import org.openide.util.actions.Presenter; -import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.autopsy.ingest.IngestManager; -import java.util.logging.Level; -import org.openide.DialogDescriptor; -import org.openide.DialogDisplayer; -import org.openide.NotifyDescriptor; -import org.openide.windows.WindowManager; -import java.awt.Cursor; import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionReferences; import org.openide.awt.ActionRegistration; +import org.openide.util.HelpCtx; +import org.openide.util.NbBundle; +import org.openide.util.actions.CallableSystemAction; +import org.openide.util.actions.Presenter; +import org.openide.windows.WindowManager; +import org.sleuthkit.autopsy.actions.IngestRunningCheck; +import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; /** - * The action to close the current Case. This class should be disabled on - * creation and it will be enabled on new case creation or case opened. + * The action associated with the Case/Close Case menu item and the Close Case + * toolbar button. It closes the current case and pops up the start up window + * that allows a user to open another case. + * + * This action should only be invoked in the event dispatch thread (EDT). */ @ActionID(category = "Tools", id = "org.sleuthkit.autopsy.casemodule.CaseCloseAction") @ActionRegistration(displayName = "#CTL_CaseCloseAct", lazy = false) @@ -51,87 +53,69 @@ import org.openide.awt.ActionRegistration; @ActionReference(path = "Toolbars/Case", position = 104)}) public final class CaseCloseAction extends CallableSystemAction implements Presenter.Toolbar { - JButton toolbarButton = new JButton(); + private static final long serialVersionUID = 1L; + private static final Logger logger = Logger.getLogger(CaseCloseAction.class.getName()); + private final JButton toolbarButton = new JButton(); /** - * The constructor for this class + * Constructs the action associated with the Case/Close Case menu item and + * the Close Case toolbar button. */ public CaseCloseAction() { - putValue("iconBase", "org/sleuthkit/autopsy/images/close-icon.png"); // put the icon NON-NLS - putValue(Action.NAME, NbBundle.getMessage(CaseCloseAction.class, "CTL_CaseCloseAct")); // put the action Name - - // set action of the toolbar button + putValue("iconBase", "org/sleuthkit/autopsy/images/close-icon.png"); //NON-NLS + putValue(Action.NAME, NbBundle.getMessage(CaseCloseAction.class, "CTL_CaseCloseAct")); //NON-NLS toolbarButton.addActionListener(CaseCloseAction.this::actionPerformed); - this.setEnabled(false); } /** - * Closes the current opened case. + * Closes the current case. * - * @param e the action event for this method + * @param e The action event. */ @Override public void actionPerformed(ActionEvent e) { + String optionsDlgTitle = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning.title"); + String optionsDlgMessage = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning"); + if (IngestRunningCheck.checkAndConfirmProceed(optionsDlgTitle, optionsDlgMessage)) { + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + new SwingWorker() { - // if ingest is ongoing, warn and get confirmaion before opening a different case - if (IngestManager.getInstance().isIngestRunning()) { - // show the confirmation first to close the current case and open the "New Case" wizard panel - String closeCurrentCase = NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"); - NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(closeCurrentCase, - NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning.title"), - NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); - descriptor.setValue(NotifyDescriptor.NO_OPTION); - - Object res = DialogDisplayer.getDefault().notify(descriptor); - if (res != null && res == DialogDescriptor.YES_OPTION) { - try { - Case.getCurrentCase().closeCase(); // close the current case - } catch (Exception ex) { - Logger.getLogger(NewCaseWizardAction.class.getName()).log(Level.WARNING, "Error closing case.", ex); //NON-NLS + @Override + protected Void doInBackground() throws Exception { + Case.closeCurrentCase(); + return null; } - } else { - return; - } - } - if (Case.isCaseOpen() == false) { - return; - } - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - new SwingWorker() { - - @Override - protected Void doInBackground() throws Exception { - try { - Case result = Case.getCurrentCase(); - result.closeCase(); - } catch (CaseActionException | IllegalStateException unused) { - // Already logged. + @Override + protected void done() { + try { + get(); + } catch (InterruptedException ex) { + logger.log(Level.SEVERE, "Unexpected interrupt closing the current case", ex); + } catch (ExecutionException ex) { + logger.log(Level.SEVERE, "Error closing the current case", ex); + MessageNotifyUtil.Message.error(Bundle.Case_closeException_couldNotCloseCase(ex.getMessage())); + } + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + StartupWindowProvider.getInstance().open(); } - return null; - } - - @Override - protected void done() { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - StartupWindowProvider.getInstance().open(); - } - }.execute(); + }.execute(); + } } /** - * This method does nothing. Use the "actionPerformed(ActionEvent e)" - * instead of this method. + * Closes the current case. */ @Override public void performAction() { + actionPerformed(null); } /** - * Gets the name of this action. This may be presented as an item in a menu. + * Gets the action name. * - * @return actionName + * @return The action name. */ @Override public String getName() { @@ -139,9 +123,9 @@ public final class CaseCloseAction extends CallableSystemAction implements Prese } /** - * Gets the HelpCtx associated with implementing object + * Gets the help context. * - * @return HelpCtx or HelpCtx.DEFAULT_HELP + * @return The help context. */ @Override public HelpCtx getHelpCtx() { @@ -149,9 +133,9 @@ public final class CaseCloseAction extends CallableSystemAction implements Prese } /** - * Returns the toolbar component of this action + * Returns the toolbar component of this action. * - * @return component the toolbar button + * @return The toolbar button */ @Override public Component getToolbarPresenter() { diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java index 6ec7c79222..8a9f7bc17c 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,138 +19,106 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.event.ActionEvent; -import java.io.File; +import java.util.concurrent.ExecutionException; import java.util.logging.Level; -import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.Action; import javax.swing.JOptionPane; -import javax.swing.JPanel; -import org.openide.DialogDescriptor; -import org.openide.DialogDisplayer; -import org.openide.NotifyDescriptor; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; -import org.openide.util.actions.CallableSystemAction; -; -import org.sleuthkit.autopsy.coreutils.Logger; -import javax.swing.Action; -import javax.swing.JOptionPane; -import javax.swing.JPanel; +import javax.swing.SwingWorker; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; +import org.openide.util.NbBundle.Messages; import org.openide.util.actions.CallableSystemAction; import org.sleuthkit.autopsy.coreutils.Logger; -import javax.swing.Action; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import org.openide.DialogDescriptor; -import org.openide.DialogDisplayer; -import org.openide.NotifyDescriptor; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; -import org.openide.util.actions.CallableSystemAction; /** - * The action to delete the current Case. This class should be disabled on - * creation and it will be enabled on new case creation or case opened. + * The action associated with the Delete button of the Case Properties panel. It + * deletes the current case. + * + * This action should only be invoked in the event dispatch thread (EDT). */ - - final class CaseDeleteAction extends CallableSystemAction { - private JPanel caller; // for error handling - + private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(CaseDeleteAction.class.getName()); - /** - * The constructor for this class - */ - public CaseDeleteAction() { - putValue(Action.NAME, NbBundle.getMessage(CaseDeleteAction.class, "CTL_CaseDeleteAction")); // put the action Name + CaseDeleteAction() { + putValue(Action.NAME, NbBundle.getMessage(CaseDeleteAction.class, "CTL_CaseDeleteAction")); this.setEnabled(false); } - /** - * Deletes the current opened case. - * - * @param e - */ @Override + @Messages({ + "Case.deleteCaseConfirmationDialog.title=Delete Current Case?", + "Case.deleteCaseConfirmationDialog.message=Are you sure you want to close and delete the current case?", + "Case.deleteCaseFailureMessageBox.title=Failed to Delete Case", + "# {0} - exception message", "Case.deleteCaseFailureMessageBox.message=Error deleting case: {0}",}) public void actionPerformed(ActionEvent e) { - Case currentCase = Case.getCurrentCase(); - File caseFolder = new File(currentCase.getCaseDirectory()); - String caseName = currentCase.getName(); - if (!caseFolder.exists()) { - // throw an error + try { + Case currentCase = Case.getCurrentCase(); + String caseName = currentCase.getName(); + String caseDirectory = currentCase.getCaseDirectory(); - logger.log(Level.WARNING, "Couldn't delete case.", new Exception("The case directory doesn't exist.")); //NON-NLS - } else { - // show the confirmation first to close the current case and open the "New Case" wizard panel - String closeCurrentCase = NbBundle.getMessage(this.getClass(), "CaseDeleteAction.closeConfMsg.text", caseName, caseFolder.getPath()); - NotifyDescriptor d = new NotifyDescriptor.Confirmation(closeCurrentCase, - NbBundle.getMessage(this.getClass(), - "CaseDeleteAction.closeConfMsg.title"), - NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); - d.setValue(NotifyDescriptor.NO_OPTION); + /* + * Do a confirmation dialog and close the current case if the user + * confirms he/she wants to proceed. + */ + Object response = DialogDisplayer.getDefault().notify(new NotifyDescriptor( + Bundle.Case_deleteCaseConfirmationDialog_message(), + Bundle.Case_deleteCaseConfirmationDialog_title(), + NotifyDescriptor.YES_NO_OPTION, + NotifyDescriptor.WARNING_MESSAGE, + null, + NotifyDescriptor.NO_OPTION)); + if (null != response && DialogDescriptor.YES_OPTION == response) { - Object res = DialogDisplayer.getDefault().notify(d); - if (res != null && res == DialogDescriptor.YES_OPTION) { - boolean success = false; + new SwingWorker() { - try { - Case.getCurrentCase().deleteCase(caseFolder); // delete the current case - success = true; - } catch (CaseActionException ex) { - logger.log(Level.WARNING, "Could not delete the case folder: " + caseFolder); //NON-NLS - } + @Override + protected Void doInBackground() throws Exception { + Case.deleteCurrentCase(); + return null; + } - // show notification whether the case has been deleted or it failed to delete... - if (!success) { - JOptionPane.showMessageDialog(caller, - NbBundle.getMessage(this.getClass(), - "CaseDeleteAction.msgDlg.fileInUse.msg"), - NbBundle.getMessage(this.getClass(), - "CaseDeleteAction.msgDlg.fileInUse.title"), - JOptionPane.ERROR_MESSAGE); // throw an error - } else { - CasePropertiesAction.closeCasePropertiesWindow(); // because the "Delete Case" button is in the "CaseProperties" window, we have to close that window when we delete the case. - JOptionPane.showMessageDialog(caller, NbBundle.getMessage(this.getClass(), - "CaseDeleteAction.msgDlg.caseDelete.msg", - caseName)); - } + @Override + protected void done() { + try { + get(); + } catch (InterruptedException | ExecutionException ex) { + logger.log(Level.SEVERE, String.format("Failed to delete case %s at %s", caseName, caseDirectory), ex); + JOptionPane.showMessageDialog( + null, + Bundle.Case_deleteCaseFailureMessageBox_message(ex.getMessage()), + Bundle.Case_deleteCaseFailureMessageBox_title(), + JOptionPane.ERROR_MESSAGE); + } + /* + * Close the Case Properties dialog that is the parent + * of the Delete button that invokes this action. + */ + CasePropertiesAction.closeCasePropertiesWindow(); + } + }.execute(); } + } catch (IllegalStateException ex) { + logger.log(Level.SEVERE, "Case delete action called with no current case", ex); } } - /** - * This method does nothing. Use the "actionPerformed(ActionEvent e)" - * instead of this method. - */ @Override public void performAction() { - // Note: I use the actionPerformed above instead of this method } - /** - * Gets the name of this action. This may be presented as an item in a menu. - * - * @return actionName - */ @Override public String getName() { return NbBundle.getMessage(CaseDeleteAction.class, "CTL_CaseDeleteAction"); } - /** - * Gets the HelpCtx associated with implementing object - * - * @return HelpCtx or HelpCtx.DEFAULT_HELP - */ @Override public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; } + } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java index 15370e5d45..cc81d70a30 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java @@ -54,7 +54,7 @@ class CaseInformationPanel extends javax.swing.JPanel { // put the image paths information into hashmap Map imgPaths = Case.getImagePaths(currentCase.getSleuthkitCase()); - CasePropertiesForm cpf = new CasePropertiesForm(currentCase, crDate, caseDir, imgPaths); + CasePropertiesPanel cpf = new CasePropertiesPanel(currentCase, crDate, caseDir, imgPaths); cpf.setSize(cpf.getPreferredSize()); this.tabbedPane.addTab(Bundle.CaseInformationPanel_caseDetails_header(), cpf); this.tabbedPane.addTab(Bundle.CaseInformationPanel_ingestJobInfo_header(), new IngestJobInfoPanel()); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java index bd07a3deaf..e7b4e98c99 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -54,10 +54,11 @@ public final class CaseMetadata { private static final String FILE_EXTENSION = ".aut"; private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss (z)"); private static final String SCHEMA_VERSION_ONE = "1.0"; - private final static String AUTOPSY_CREATED_VERSION_ELEMENT_NAME = "AutopsyCreatedVersion"; //NON-NLS + private static final String SCHEMA_VERSION_TWO = "2.0"; + private final static String AUTOPSY_VERSION_ELEMENT_NAME = "AutopsyCreatedVersion"; //NON-NLS private final static String CASE_DATABASE_NAME_ELEMENT_NAME = "DatabaseName"; //NON-NLS private final static String TEXT_INDEX_NAME_ELEMENT = "TextIndexName"; //NON-NLS - private static final String CURRENT_SCHEMA_VERSION = "2.0"; + private static final String CURRENT_SCHEMA_VERSION = "3.0"; private final static String ROOT_ELEMENT_NAME = "AutopsyCase"; //NON-NLS private final static String SCHEMA_VERSION_ELEMENT_NAME = "SchemaVersion"; //NON-NLS private final static String CREATED_DATE_ELEMENT_NAME = "CreatedDate"; //NON-NLS @@ -66,6 +67,7 @@ public final class CaseMetadata { private final static String AUTOPSY_SAVED_BY_ELEMENT_NAME = "SavedByAutopsyVersion"; //NON-NLS private final static String CASE_ELEMENT_NAME = "Case"; //NON-NLS private final static String CASE_NAME_ELEMENT_NAME = "Name"; //NON-NLS + private final static String CASE_DISPLAY_NAME_ELEMENT_NAME = "DisplayName"; //NON-NLS private final static String CASE_NUMBER_ELEMENT_NAME = "Number"; //NON-NLS private final static String EXAMINER_ELEMENT_NAME = "Examiner"; //NON-NLS private final static String CASE_TYPE_ELEMENT_NAME = "CaseType"; //NON-NLS @@ -74,9 +76,10 @@ public final class CaseMetadata { private final Path metadataFilePath; private Case.CaseType caseType; private String caseName; + private String caseDisplayName; private String caseNumber; private String examiner; - private String caseDatabase; + private String caseDatabaseName; private String textIndexName; private String createdDate; private String createdByVersion; @@ -94,27 +97,28 @@ public final class CaseMetadata { * Constructs an object that provides access to the case metadata stored in * a new case metadata file that is created using the supplied metadata. * - * @param caseDirectory The case directory. - * @param caseType The type of case. - * @param caseName The name of the case. - * @param caseNumber The case number. - * @param examiner The name of the case examiner. - * @param caseDatabase For a single-user case, the full path to the - * case database file. For a multi-user case, the - * case database name. - * @param caseTextIndexName The text index name. + * @param caseDirectory The case directory. + * @param caseType The type of case. + * @param caseName The immutable name of the case. + * @param caseDisplayName The display name of the case, can be changed by a + * user. + * @param caseNumber The case number. + * @param examiner The name of the case examiner. + * @param caseDatabase For a single-user case, the full path to the case + * database file. For a multi-user case, the case + * database name. * * @throws CaseMetadataException If the new case metadata file cannot be * created. */ - CaseMetadata(String caseDirectory, Case.CaseType caseType, String caseName, String caseNumber, String examiner, String caseDatabase, String caseTextIndexName) throws CaseMetadataException { + CaseMetadata(String caseDirectory, Case.CaseType caseType, String caseName, String caseDisplayName, String caseNumber, String examiner, String caseDatabase) throws CaseMetadataException { metadataFilePath = Paths.get(caseDirectory, caseName + FILE_EXTENSION); this.caseType = caseType; this.caseName = caseName; + this.caseDisplayName = caseDisplayName; this.caseNumber = caseNumber; this.examiner = examiner; - this.caseDatabase = caseDatabase; - this.textIndexName = caseTextIndexName; + this.caseDatabaseName = caseDatabase; createdByVersion = Version.getVersion(); createdDate = CaseMetadata.DATE_FORMAT.format(new Date()); writeToFile(); @@ -162,7 +166,7 @@ public final class CaseMetadata { } /** - * Gets the case display name. + * Gets the immutable case name, set at case creation. * * @return The case display name. */ @@ -170,19 +174,28 @@ public final class CaseMetadata { return caseName; } + /** + * Gets the case display name. + * + * @return The case display name. + */ + public String getCaseDisplayName() { + return this.caseDisplayName; + } + /** * Sets the case display name. This does not change the name of the case * directory, the case database, or the text index name. * * @param caseName A case display name. */ - void setCaseName(String caseName) throws CaseMetadataException { + void setCaseDisplayName(String caseName) throws CaseMetadataException { String oldCaseName = caseName; - this.caseName = caseName; + this.caseDisplayName = caseName; try { writeToFile(); } catch (CaseMetadataException ex) { - this.caseName = oldCaseName; + this.caseDisplayName = oldCaseName; throw ex; } } @@ -206,31 +219,27 @@ public final class CaseMetadata { } /** - * Gets the name of the case case database. + * Gets the name of the case database. * * @return The case database name. */ public String getCaseDatabaseName() { - if (caseType == Case.CaseType.MULTI_USER_CASE) { - return caseDatabase; - } else { - return Paths.get(caseDatabase).getFileName().toString(); - } + return caseDatabaseName; } /** - * Gets the full path to the case database file if the case is a single-user - * case. + * Sets the text index name. * - * @return The full path to the case database file for a single-user case. - * - * @throws UnsupportedOperationException If called for a multi-user case. + * @param caseTextIndexName The text index name. */ - public String getCaseDatabasePath() throws UnsupportedOperationException { - if (caseType == Case.CaseType.SINGLE_USER_CASE) { - return caseDatabase; - } else { - throw new UnsupportedOperationException(); + void setTextIndexName(String caseTextIndexName) throws CaseMetadataException { + String oldIndexName = caseTextIndexName; + this.textIndexName = caseTextIndexName; + try { + writeToFile(); + } catch (CaseMetadataException ex) { + this.textIndexName = oldIndexName; + throw ex; } } @@ -355,10 +364,11 @@ public final class CaseMetadata { * Create the children of the case element. */ createChildElement(doc, caseElement, CASE_NAME_ELEMENT_NAME, caseName); + createChildElement(doc, caseElement, CASE_DISPLAY_NAME_ELEMENT_NAME, caseDisplayName); createChildElement(doc, caseElement, CASE_NUMBER_ELEMENT_NAME, caseNumber); createChildElement(doc, caseElement, EXAMINER_ELEMENT_NAME, examiner); createChildElement(doc, caseElement, CASE_TYPE_ELEMENT_NAME, caseType.toString()); - createChildElement(doc, caseElement, CASE_DATABASE_ELEMENT_NAME, caseDatabase); + createChildElement(doc, caseElement, CASE_DATABASE_ELEMENT_NAME, caseDatabaseName); createChildElement(doc, caseElement, TEXT_INDEX_ELEMENT, textIndexName); } @@ -402,7 +412,7 @@ public final class CaseMetadata { String schemaVersion = getElementTextContent(rootElement, SCHEMA_VERSION_ELEMENT_NAME, true); this.createdDate = getElementTextContent(rootElement, CREATED_DATE_ELEMENT_NAME, true); if (schemaVersion.equals(SCHEMA_VERSION_ONE)) { - this.createdByVersion = getElementTextContent(rootElement, AUTOPSY_CREATED_VERSION_ELEMENT_NAME, true); + this.createdByVersion = getElementTextContent(rootElement, AUTOPSY_VERSION_ELEMENT_NAME, true); } else { this.createdByVersion = getElementTextContent(rootElement, AUTOPSY_CREATED_BY_ELEMENT_NAME, true); } @@ -416,6 +426,11 @@ public final class CaseMetadata { } Element caseElement = (Element) caseElements.item(0); this.caseName = getElementTextContent(caseElement, CASE_NAME_ELEMENT_NAME, true); + if (schemaVersion.equals(SCHEMA_VERSION_ONE) || schemaVersion.equals(SCHEMA_VERSION_TWO)) { + this.caseDisplayName = caseName; + } else { + this.caseDisplayName = getElementTextContent(caseElement, CASE_DISPLAY_NAME_ELEMENT_NAME, true); + } this.caseNumber = getElementTextContent(caseElement, CASE_NUMBER_ELEMENT_NAME, false); this.examiner = getElementTextContent(caseElement, EXAMINER_ELEMENT_NAME, false); this.caseType = Case.CaseType.fromString(getElementTextContent(caseElement, CASE_TYPE_ELEMENT_NAME, true)); @@ -423,11 +438,21 @@ public final class CaseMetadata { throw new CaseMetadataException("Case metadata file corrupted"); } if (schemaVersion.equals(SCHEMA_VERSION_ONE)) { - this.caseDatabase = getElementTextContent(caseElement, CASE_DATABASE_NAME_ELEMENT_NAME, true); + this.caseDatabaseName = getElementTextContent(caseElement, CASE_DATABASE_NAME_ELEMENT_NAME, true); this.textIndexName = getElementTextContent(caseElement, TEXT_INDEX_NAME_ELEMENT, true); } else { - this.caseDatabase = getElementTextContent(caseElement, CASE_DATABASE_ELEMENT_NAME, true); - this.textIndexName = getElementTextContent(caseElement, TEXT_INDEX_ELEMENT, true); + this.caseDatabaseName = getElementTextContent(caseElement, CASE_DATABASE_ELEMENT_NAME, true); + this.textIndexName = getElementTextContent(caseElement, TEXT_INDEX_ELEMENT, false); + } + + /* + * Fix up the case database name due to a bug that for a time caused + * the absolute paths of single-user case databases to be stored. + */ + Path possibleAbsoluteCaseDbPath = Paths.get(this.caseDatabaseName); + if (possibleAbsoluteCaseDbPath.getNameCount() > 1) { + Path caseDirectoryPath = Paths.get(getCaseDirectory()); + this.caseDatabaseName = caseDirectoryPath.relativize(possibleAbsoluteCaseDbPath).toString(); } /* @@ -483,4 +508,22 @@ public final class CaseMetadata { } } + /** + * Gets the full path to the case database file if the case is a single-user + * case. + * + * @return The full path to the case database file for a single-user case. + * + * @throws UnsupportedOperationException If called for a multi-user case. + * @deprecated + */ + @Deprecated + public String getCaseDatabasePath() throws UnsupportedOperationException { + if (Case.CaseType.SINGLE_USER_CASE == caseType) { + return Paths.get(getCaseDirectory(), caseDatabaseName).toString(); + } else { + throw new UnsupportedOperationException(); + } + } + } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewAction.java index 4e8243d3ba..6e3acaceec 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,27 +26,25 @@ import org.openide.util.actions.SystemAction; import org.openide.util.lookup.ServiceProvider; /** - * The action to create a new case. This action class is always enabled. - * - * @author jantonius + * The action associated with the Case/New Case menu item and the Create New + * Case button of the start up window that allows a user to open a case. It + * invokes the New Case wizard. + * + * This action should only be invoked in the event dispatch thread (EDT). */ @ServiceProvider(service = CaseNewActionInterface.class) public final class CaseNewAction extends CallableSystemAction implements CaseNewActionInterface { - private NewCaseWizardAction wizard = SystemAction.get(NewCaseWizardAction.class); + private static final long serialVersionUID = 1L; - /** - * Calls the "New Case" wizard panel action. - * - * @param e - */ @Override public void actionPerformed(ActionEvent e) { - wizard.performAction(); + SystemAction.get(NewCaseWizardAction.class).performAction(); } @Override public void performAction() { + actionPerformed(null); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java index 8a4f4b6c6f..a5064606f2 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,39 +22,45 @@ import java.awt.Cursor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; import javax.swing.JFileChooser; import javax.swing.JOptionPane; -import javax.swing.SwingUtilities; +import javax.swing.SwingWorker; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileNameExtensionFilter; +import org.openide.util.HelpCtx; import org.openide.util.NbBundle; +import org.openide.util.actions.CallableSystemAction; import org.openide.util.lookup.ServiceProvider; import org.openide.windows.WindowManager; +import org.sleuthkit.autopsy.actions.IngestRunningCheck; +import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.autopsy.coreutils.Version; -import org.openide.DialogDescriptor; -import org.openide.DialogDisplayer; -import org.openide.NotifyDescriptor; -import org.sleuthkit.autopsy.coreutils.Logger; -import java.util.logging.Level; -import org.openide.util.HelpCtx; -import org.openide.util.actions.CallableSystemAction; -import org.sleuthkit.autopsy.ingest.IngestManager; /** - * An action that opens an existing case. + * The action associated with the Case/Open Case menu item via the layer.xml + * file, a toolbar button, and the Create New Case button of the start up window + * that allows a user to open a case. It opens an existing case. + * + * This action should only be invoked in the event dispatch thread (EDT). */ @ServiceProvider(service = CaseOpenAction.class) public final class CaseOpenAction extends CallableSystemAction implements ActionListener { - private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName()); - private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS private static final long serialVersionUID = 1L; + private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS + private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName()); private final JFileChooser fileChooser = new JFileChooser(); private final FileFilter caseMetadataFileFilter; /** - * Constructs an action that opens an existing case. + * Constructs the action associated with the Case/Open Case menu item via + * the layer.xml file, a toolbar button, and the Create New Case button of + * the start up window that allows a user to open a case. It opens an + * existing case. + * */ public CaseOpenAction() { caseMetadataFileFilter = new FileNameExtensionFilter(NbBundle.getMessage(CaseOpenAction.class, "CaseOpenAction.autFilter.title", Version.getName(), CaseMetadata.getFileExtension()), CaseMetadata.getFileExtension().substring(1)); @@ -75,77 +81,60 @@ public final class CaseOpenAction extends CallableSystemAction implements Action */ @Override public void actionPerformed(ActionEvent e) { - /* - * If ingest is running, do a dialog to warn the user and confirm the - * intent to close the current case and leave the ingest process - * incomplete. - */ - if (IngestManager.getInstance().isIngestRunning()) { - NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation( - NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"), - NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning.title"), - NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); - descriptor.setValue(NotifyDescriptor.NO_OPTION); - Object res = DialogDisplayer.getDefault().notify(descriptor); - if (res != null && res == DialogDescriptor.YES_OPTION) { - Case currentCase = null; - try { - currentCase = Case.getCurrentCase(); - currentCase.closeCase(); - } catch (IllegalStateException ignored) { - /* - * No current case. - */ - } catch (CaseActionException ex) { - logger.log(Level.SEVERE, String.format("Error closing case at %s while ingest was running", (null != currentCase ? currentCase.getCaseDirectory() : "?")), ex); //NON-NLS - } - } else { - return; - } - } - - /** - * Pop up a file chooser to allow the user to select a case meta data - * file (.aut file). - */ - int retval = fileChooser.showOpenDialog(WindowManager.getDefault().getMainWindow()); - if (retval == JFileChooser.APPROVE_OPTION) { - /* - * Close the startup window, if it is open. + String optionsDlgTitle = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning.title"); + String optionsDlgMessage = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning"); + if (IngestRunningCheck.checkAndConfirmProceed(optionsDlgTitle, optionsDlgMessage)) { + /** + * Pop up a file chooser to allow the user to select a case metadata + * file (.aut file). */ - StartupWindowProvider.getInstance().close(); + int retval = fileChooser.showOpenDialog(WindowManager.getDefault().getMainWindow()); + if (retval == JFileChooser.APPROVE_OPTION) { + /* + * Close the startup window, if it is open. + */ + StartupWindowProvider.getInstance().close(); - /* - * Try to open the case associated with the case metadata file the - * user selected. - */ - final String path = fileChooser.getSelectedFile().getPath(); - String dirPath = fileChooser.getSelectedFile().getParent(); - ModuleSettings.setConfigSetting(ModuleSettings.MAIN_SETTINGS, PROP_BASECASE, dirPath.substring(0, dirPath.lastIndexOf(File.separator))); - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - new Thread(() -> { - try { - Case.open(path); - } catch (CaseActionException ex) { - logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", path), ex); //NON-NLS - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - JOptionPane.showMessageDialog( - WindowManager.getDefault().getMainWindow(), - ex.getMessage(), // Should be user-friendly - NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), //NON-NLS - JOptionPane.ERROR_MESSAGE); - if (!Case.isCaseOpen()) { + /* + * Try to open the case associated with the case metadata file + * the user selected. + */ + final String path = fileChooser.getSelectedFile().getPath(); + String dirPath = fileChooser.getSelectedFile().getParent(); + ModuleSettings.setConfigSetting(ModuleSettings.MAIN_SETTINGS, PROP_BASECASE, dirPath.substring(0, dirPath.lastIndexOf(File.separator))); + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + new SwingWorker() { + + @Override + protected Void doInBackground() throws Exception { + Case.openAsCurrentCase(path); + return null; + } + + @Override + protected void done() { + try { + get(); + } catch (InterruptedException | ExecutionException ex) { + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", path), ex); //NON-NLS + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + ex.getMessage(), + NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), //NON-NLS + JOptionPane.ERROR_MESSAGE); StartupWindowProvider.getInstance().open(); } - }); - } - }).start(); + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + }.execute(); + } } } @Override public void performAction() { + actionPerformed(null); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java index 462a60d96a..3f80544101 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,98 +23,70 @@ import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.util.logging.Level; import javax.swing.Action; import javax.swing.JDialog; -import javax.swing.JFrame; +import javax.swing.SwingUtilities; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; import org.openide.windows.WindowManager; -import org.sleuthkit.autopsy.coreutils.Logger; /** - * The action to pop up the Case Properties Form window. By using this form, - * user can update the case properties (for example: updates the case name and - * removes the image from the current case) - * - * @author jantonius + * The action associated with the Case/Case Properties menu item. It invokes the + * Case Properties dialog. */ final class CasePropertiesAction extends CallableSystemAction { - private static JDialog popUpWindow; + private static final long serialVersionUID = 1L; + private static JDialog casePropertiesDialog; - /** - * The CasePropertiesAction constructor - */ CasePropertiesAction() { - putValue(Action.NAME, NbBundle.getMessage(CasePropertiesAction.class, "CTL_CasePropertiesAction")); // put the action Name + putValue(Action.NAME, NbBundle.getMessage(CasePropertiesAction.class, "CTL_CasePropertiesAction")); this.setEnabled(false); Case.addEventSubscriber(Case.Events.CURRENT_CASE.toString(), new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { - popUpWindow = null; + setEnabled(null != evt.getNewValue()); } }); } - /** - * Pop-up the Case Properties Form window where user can change the case - * properties (example: update case name and remove the image from the case) - */ @Override public void performAction() { - if (popUpWindow == null) { - // create the popUp window for it - String title = NbBundle.getMessage(this.getClass(), "CasePropertiesAction.window.title"); - popUpWindow = new JDialog((JFrame) WindowManager.getDefault().getMainWindow(), title, false); - try { - + SwingUtilities.invokeLater(() -> { + if (null == casePropertiesDialog) { + String title = NbBundle.getMessage(this.getClass(), "CasePropertiesAction.window.title"); + casePropertiesDialog = new JDialog(WindowManager.getDefault().getMainWindow(), title, false); CaseInformationPanel caseInformationPanel = new CaseInformationPanel(); caseInformationPanel.addCloseButtonAction((ActionEvent e) -> { - popUpWindow.dispose(); + casePropertiesDialog.setVisible(false); }); + casePropertiesDialog.add(caseInformationPanel); + casePropertiesDialog.setResizable(true); + casePropertiesDialog.pack(); - popUpWindow.add(caseInformationPanel); - popUpWindow.setResizable(true); - popUpWindow.pack(); - - // set the location of the popUp Window on the center of the screen Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); - double w = popUpWindow.getSize().getWidth(); - double h = popUpWindow.getSize().getHeight(); - popUpWindow.setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2)); - - popUpWindow.setVisible(true); - } catch (Exception ex) { - Logger.getLogger(CasePropertiesAction.class.getName()).log(Level.WARNING, "Error displaying Case Properties window.", ex); //NON-NLS + double w = casePropertiesDialog.getSize().getWidth(); + double h = casePropertiesDialog.getSize().getHeight(); + casePropertiesDialog.setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2)); + casePropertiesDialog.setVisible(true); } - } - popUpWindow.setVisible(true); - popUpWindow.toFront(); + casePropertiesDialog.setVisible(true); + casePropertiesDialog.toFront(); + }); } - /** - * Gets the name of this action. This may be presented as an item in a menu. - * - * @return actionName - */ @Override public String getName() { return NbBundle.getMessage(CasePropertiesAction.class, "CTL_CasePropertiesAction"); } - /** - * Gets the HelpCtx associated with implementing object - * - * @return HelpCtx or HelpCtx.DEFAULT_HELP - */ @Override public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; } static void closeCasePropertiesWindow() { - popUpWindow.dispose(); + casePropertiesDialog.setVisible(false); } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesForm.form b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form similarity index 91% rename from Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesForm.form rename to Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form index e2b4940105..1d46bebfbb 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesForm.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form @@ -161,7 +161,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -197,12 +197,9 @@ - + - - - @@ -212,7 +209,7 @@ - + @@ -227,7 +224,7 @@ - + @@ -242,7 +239,7 @@ - + @@ -254,7 +251,7 @@ - + @@ -266,7 +263,7 @@ - + @@ -278,7 +275,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesForm.java b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java similarity index 77% rename from Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesForm.java rename to Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java index f4cc9cb24e..753033fe51 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesForm.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,14 +17,9 @@ * limitations under the License. */ - /* - * CasePropertiesForm.java - * - * Created on Mar 14, 2011, 1:48:20 PM - */ package org.sleuthkit.autopsy.casemodule; -import java.io.File; +import java.nio.file.Paths; import java.util.Map; import java.util.logging.Level; import javax.swing.JOptionPane; @@ -37,55 +32,26 @@ import org.openide.util.actions.CallableSystemAction; import org.sleuthkit.autopsy.coreutils.Logger; /** - * The form where user can change / update the properties of the current case - * metadata. + * A panel that allows the user to view various properties of the current case + * and change the display name of the case. */ -class CasePropertiesForm extends javax.swing.JPanel { - +class CasePropertiesPanel extends javax.swing.JPanel { + private static final long serialVersionUID = 1L; - private Case current = null; private static JPanel caller; // panel for error - // Shrink a path to fit in targetLength (if necessary), by replaceing part - // of the path with "...". Ex: "C:\Users\bob\...\folder\other\Image.img" - private String shrinkPath(String path, int targetLength) { - if (path.length() > targetLength) { - String fill = "..."; - - int partsLength = targetLength - fill.length(); - - String front = path.substring(0, partsLength / 4); - int frontSep = front.lastIndexOf(File.separatorChar); - if (frontSep != -1) { - front = front.substring(0, frontSep + 1); - } - - String back = path.substring(partsLength * 3 / 4); - int backSep = back.indexOf(File.separatorChar); - if (backSep != -1) { - back = back.substring(backSep); - } - return back + fill + front; - } else { - return path; - } - } - - /** - * Creates new form CasePropertiesForm - */ - CasePropertiesForm(Case currentCase, String crDate, String caseDir, Map imgPaths) throws CaseMetadata.CaseMetadataException { + CasePropertiesPanel(Case currentCase, String crDate, String caseDir, Map imgPaths) throws CaseMetadata.CaseMetadataException { initComponents(); - caseNameTextField.setText(currentCase.getName()); + caseNameTextField.setText(currentCase.getDisplayName()); String caseNumber = currentCase.getNumber(); - if (!caseNumber.equals("")) { + if (!caseNumber.isEmpty()) { caseNumberField.setText(caseNumber); } else { caseNumberField.setText("N/A"); } String examiner = currentCase.getExaminer(); - if (!examiner.equals("")) { + if (!examiner.isEmpty()) { examinerField.setText(examiner); } else { examinerField.setText("N/A"); @@ -93,10 +59,10 @@ class CasePropertiesForm extends javax.swing.JPanel { crDateField.setText(crDate); caseDirField.setText(caseDir); current = currentCase; - + CaseMetadata caseMetadata = currentCase.getCaseMetadata(); if (caseMetadata.getCaseType() == Case.CaseType.SINGLE_USER_CASE) { - dbNameField.setText(caseMetadata.getCaseDatabasePath()); + dbNameField.setText(Paths.get(caseMetadata.getCaseDirectory(), caseMetadata.getCaseDatabaseName()).toString()); } else { dbNameField.setText(caseMetadata.getCaseDatabaseName()); } @@ -152,24 +118,19 @@ class CasePropertiesForm extends javax.swing.JPanel { jScrollPane1.setViewportView(jTextArea1); caseNameLabel.setFont(caseNameLabel.getFont().deriveFont(caseNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - caseNameLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.caseNameLabel.text")); // NOI18N + caseNameLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.caseNameLabel.text")); // NOI18N crDateLabel.setFont(crDateLabel.getFont().deriveFont(crDateLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - crDateLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.crDateLabel.text")); // NOI18N + crDateLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.crDateLabel.text")); // NOI18N caseDirLabel.setFont(caseDirLabel.getFont().deriveFont(caseDirLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - caseDirLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.caseDirLabel.text")); // NOI18N + caseDirLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.caseDirLabel.text")); // NOI18N caseNameTextField.setFont(caseNameTextField.getFont().deriveFont(caseNameTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - caseNameTextField.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.caseNameTextField.text")); // NOI18N - caseNameTextField.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - caseNameTextFieldActionPerformed(evt); - } - }); + caseNameTextField.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.caseNameTextField.text")); // NOI18N updateCaseNameButton.setFont(updateCaseNameButton.getFont().deriveFont(updateCaseNameButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - updateCaseNameButton.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.updateCaseNameButton.text")); // NOI18N + updateCaseNameButton.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.updateCaseNameButton.text")); // NOI18N updateCaseNameButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { updateCaseNameButtonActionPerformed(evt); @@ -177,7 +138,7 @@ class CasePropertiesForm extends javax.swing.JPanel { }); deleteCaseButton.setFont(deleteCaseButton.getFont().deriveFont(deleteCaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - deleteCaseButton.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.deleteCaseButton.text")); // NOI18N + deleteCaseButton.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.deleteCaseButton.text")); // NOI18N deleteCaseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteCaseButtonActionPerformed(evt); @@ -185,16 +146,16 @@ class CasePropertiesForm extends javax.swing.JPanel { }); caseNumberLabel.setFont(caseNumberLabel.getFont().deriveFont(caseNumberLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - caseNumberLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.caseNumberLabel.text")); // NOI18N + caseNumberLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.caseNumberLabel.text")); // NOI18N examinerLabel.setFont(examinerLabel.getFont().deriveFont(examinerLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - examinerLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.examinerLabel.text")); // NOI18N + examinerLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.examinerLabel.text")); // NOI18N lbDbType.setFont(lbDbType.getFont().deriveFont(lbDbType.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - lbDbType.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.lbDbType.text")); // NOI18N + lbDbType.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbDbType.text")); // NOI18N lbDbName.setFont(lbDbName.getFont().deriveFont(lbDbName.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - lbDbName.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.lbDbName.text")); // NOI18N + lbDbName.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbDbName.text")); // NOI18N caseDirField.setMinimumSize(new java.awt.Dimension(25, 14)); @@ -303,13 +264,13 @@ class CasePropertiesForm extends javax.swing.JPanel { * @param evt The action event */ private void updateCaseNameButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateCaseNameButtonActionPerformed - String oldCaseName = Case.getCurrentCase().getName(); + String oldCaseName = Case.getCurrentCase().getDisplayName(); String newCaseName = caseNameTextField.getText(); // check if the old and new case name is not equal if (!oldCaseName.equals(newCaseName)) { // check if the case name is empty - if (newCaseName.trim().equals("")) { + if (newCaseName.trim().isEmpty()) { JOptionPane.showMessageDialog(caller, NbBundle.getMessage(this.getClass(), "CasePropertiesForm.updateCaseName.msgDlg.empty.msg"), @@ -318,34 +279,36 @@ class CasePropertiesForm extends javax.swing.JPanel { JOptionPane.ERROR_MESSAGE); } else // check if case Name contain one of this following symbol: // \ / : * ? " < > | - if (newCaseName.contains("\\") || newCaseName.contains("/") || newCaseName.contains(":") - || newCaseName.contains("*") || newCaseName.contains("?") || newCaseName.contains("\"") - || newCaseName.contains("<") || newCaseName.contains(">") || newCaseName.contains("|")) { - String errorMsg = NbBundle - .getMessage(this.getClass(), "CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.msg"); - JOptionPane.showMessageDialog(caller, errorMsg, - NbBundle.getMessage(this.getClass(), - "CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.title"), - JOptionPane.ERROR_MESSAGE); - } else { - // ask for the confirmation first - String confMsg = NbBundle - .getMessage(this.getClass(), "CasePropertiesForm.updateCaseName.confMsg.msg", oldCaseName, - newCaseName); - NotifyDescriptor d = new NotifyDescriptor.Confirmation(confMsg, - NbBundle.getMessage(this.getClass(), - "CasePropertiesForm.updateCaseName.confMsg.title"), - NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); - d.setValue(NotifyDescriptor.NO_OPTION); - - Object res = DialogDisplayer.getDefault().notify(d); - if (res != null && res == DialogDescriptor.YES_OPTION) { - // if user select "Yes" - String oldPath = current.getCaseMetadata().getFilePath().toString(); - try { - current.updateCaseName(oldCaseName, oldPath, newCaseName, oldPath); - } catch (Exception ex) { - Logger.getLogger(CasePropertiesForm.class.getName()).log(Level.WARNING, "Error: problem updating case name.", ex); //NON-NLS + { + if (newCaseName.contains("\\") || newCaseName.contains("/") || newCaseName.contains(":") + || newCaseName.contains("*") || newCaseName.contains("?") || newCaseName.contains("\"") + || newCaseName.contains("<") || newCaseName.contains(">") || newCaseName.contains("|")) { + String errorMsg = NbBundle + .getMessage(this.getClass(), "CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.msg"); + JOptionPane.showMessageDialog(caller, errorMsg, + NbBundle.getMessage(this.getClass(), + "CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.title"), + JOptionPane.ERROR_MESSAGE); + } else { + // ask for the confirmation first + String confMsg = NbBundle + .getMessage(this.getClass(), "CasePropertiesForm.updateCaseName.confMsg.msg", oldCaseName, + newCaseName); + NotifyDescriptor d = new NotifyDescriptor.Confirmation(confMsg, + NbBundle.getMessage(this.getClass(), + "CasePropertiesForm.updateCaseName.confMsg.title"), + NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); + d.setValue(NotifyDescriptor.NO_OPTION); + + Object res = DialogDisplayer.getDefault().notify(d); + if (res != null && res == DialogDescriptor.YES_OPTION) { + // if user select "Yes" + String oldPath = current.getCaseMetadata().getFilePath().toString(); + try { + current.updateCaseName(oldCaseName, oldPath, newCaseName, oldPath); + } catch (CaseActionException ex) { + Logger.getLogger(CasePropertiesPanel.class.getName()).log(Level.WARNING, "Error: problem updating case name.", ex); //NON-NLS + } } } } @@ -356,10 +319,6 @@ class CasePropertiesForm extends javax.swing.JPanel { CallableSystemAction.get(CaseDeleteAction.class).actionPerformed(evt); }//GEN-LAST:event_deleteCaseButtonActionPerformed - private void caseNameTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_caseNameTextFieldActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_caseNameTextFieldActionPerformed - // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel caseDirField; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CollaborationMonitor.java b/Core/src/org/sleuthkit/autopsy/casemodule/CollaborationMonitor.java index bdb3ae29de..6042c24d12 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CollaborationMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CollaborationMonitor.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -77,8 +77,13 @@ final class CollaborationMonitor { * collaborating nodes, informs the user of collaboration tasks on other * nodes using progress bars, and monitors the health of key collaboration * services. + * + * @param eventChannelPrefix The prefix for the remote events channel. + * + * @throws + * org.sleuthkit.autopsy.casemodule.CollaborationMonitor.CollaborationMonitorException */ - CollaborationMonitor() throws CollaborationMonitorException { + CollaborationMonitor(String eventChannelPrefix) throws CollaborationMonitorException { /** * Get the local host name so it can be used to identify the source of * collaboration tasks broadcast by this node. @@ -91,9 +96,7 @@ final class CollaborationMonitor { */ eventPublisher = new AutopsyEventPublisher(); try { - Case openedCase = Case.getCurrentCase(); - String channelPrefix = openedCase.getTextIndexName(); - eventPublisher.openRemoteEventChannel(String.format(EVENT_CHANNEL_NAME, channelPrefix)); + eventPublisher.openRemoteEventChannel(String.format(EVENT_CHANNEL_NAME, eventChannelPrefix)); } catch (AutopsyEventException ex) { throw new CollaborationMonitorException("Failed to initialize", ex); } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java index 22c2485b16..956eb5fa54 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,34 +18,41 @@ */ package org.sleuthkit.autopsy.casemodule; -import java.awt.*; +import java.awt.Dialog; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import javax.swing.ImageIcon; import javax.swing.JComponent; import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JPanel; import javax.swing.KeyStroke; import org.openide.util.Lookup; import org.openide.util.NbBundle; +import org.openide.windows.WindowManager; -/** - * +/* + * The panel in the default Autopsy startup window. */ public class CueBannerPanel extends javax.swing.JPanel { - final private static String title = NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.title.text"); - final private static JFrame frame = new JFrame(title); - final static JDialog recentCasesWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal + private static final long serialVersionUID = 1L; + /* + * This is field is static for the sake of the closeOpenRecentCasesWindow + * method. + */ + private static JDialog recentCasesWindow; - // for error handling - private static JPanel caller = new JPanel(); + public static void closeOpenRecentCasesWindow() { + if (null != recentCasesWindow) { + recentCasesWindow.setVisible(false); + } + } public CueBannerPanel() { initComponents(); - refresh(); + customizeComponents(); + enableComponents(); } public CueBannerPanel(String welcomeLogo) { @@ -55,7 +62,53 @@ public class CueBannerPanel extends javax.swing.JPanel { ImageIcon icon = new ImageIcon(cl.getResource(welcomeLogo)); autopsyLogo.setIcon(icon); } - refresh(); + customizeComponents(); + enableComponents(); + } + + public void setCloseButtonActionListener(ActionListener e) { + closeButton.addActionListener(e); + } + + public void setCloseButtonText(String text) { + closeButton.setText(text); + } + + public void refresh() { + enableComponents(); + } + + private void customizeComponents() { + recentCasesWindow = new JDialog( + WindowManager.getDefault().getMainWindow(), + NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.title.text"), + Dialog.ModalityType.APPLICATION_MODAL); + recentCasesWindow.setSize(new Dimension(750, 400)); + recentCasesWindow.getRootPane().registerKeyboardAction( + e -> { + recentCasesWindow.setVisible(false); + }, + KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); + OpenRecentCasePanel recentCasesPanel = OpenRecentCasePanel.getInstance(); + recentCasesPanel.setCloseButtonActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + recentCasesWindow.setVisible(false); + } + }); + recentCasesWindow.add(recentCasesPanel); + recentCasesWindow.pack(); + recentCasesWindow.setResizable(false); + } + + private void enableComponents() { + if (RecentCases.getInstance().getTotalRecentCases() == 0) { + openRecentButton.setEnabled(false); + openRecentLabel.setEnabled(false); + } else { + openRecentButton.setEnabled(true); + openRecentLabel.setEnabled(true); + } } /** @@ -180,15 +233,6 @@ public class CueBannerPanel extends javax.swing.JPanel { ); }// //GEN-END:initComponents - public void refresh() { - if (RecentCases.getInstance().getTotalRecentCases() == 0) { - openRecentButton.setEnabled(false); - openRecentLabel.setEnabled(false); - } else { - openRecentButton.setEnabled(true); - openRecentLabel.setEnabled(true); - } - } private void newCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newCaseButtonActionPerformed Lookup.getDefault().lookup(CaseNewActionInterface.class).actionPerformed(evt); }//GEN-LAST:event_newCaseButtonActionPerformed @@ -198,37 +242,8 @@ public class CueBannerPanel extends javax.swing.JPanel { }//GEN-LAST:event_openCaseButtonActionPerformed private void openRecentButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openRecentButtonActionPerformed - - // open the recent cases dialog - Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); - - // set the popUp window / JFrame - recentCasesWindow.setSize(750, 400); - - int w = recentCasesWindow.getSize().width; - int h = recentCasesWindow.getSize().height; - - // set the location of the popUp Window on the center of the screen - recentCasesWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); - recentCasesWindow.setLocationRelativeTo(this); - recentCasesWindow.getRootPane().registerKeyboardAction(e -> { - recentCasesWindow.dispose(); - }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); - - OpenRecentCasePanel welcomeWindow = OpenRecentCasePanel.getInstance(); - - // add the command to close the window to the button on the Volume Detail Panel - welcomeWindow.setCloseButtonActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - recentCasesWindow.dispose(); - } - }); - - recentCasesWindow.add(welcomeWindow); - recentCasesWindow.pack(); - recentCasesWindow.setResizable(false); - recentCasesWindow.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); + recentCasesWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); + OpenRecentCasePanel.getInstance(); //refreshes the recent cases table recentCasesWindow.setVisible(true); }//GEN-LAST:event_openRecentButtonActionPerformed @@ -244,29 +259,4 @@ public class CueBannerPanel extends javax.swing.JPanel { private javax.swing.JLabel openRecentLabel; // End of variables declaration//GEN-END:variables - /** - * Sets the Close button action listener. - * - * @param e the action listener - */ - public void setCloseButtonActionListener(ActionListener e) { - closeButton.addActionListener(e); - } - - /** - * Sets the Close button label (default is "Close"). - * - * @param text The new label for the button. - */ - public void setCloseButtonText(String text) { - closeButton.setText(text); - } - - /** - * Close the open recent cases window. - */ - public static void closeOpenRecentCasesWindow() { - //startupWindow.setVisible(false); - recentCasesWindow.dispose(); - } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java b/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java index 1cceb7ab12..f76f620413 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java @@ -33,7 +33,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgress import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor; import org.sleuthkit.autopsy.coreutils.DataSourceUtils; -import org.sleuthkit.autopsy.corecomponentinterfaces.AutoIngestDataSourceProcessor; +import org.sleuthkit.autopsy.framework.AutoIngestDataSourceProcessor; /** * A image file data source processor that implements the DataSourceProcessor diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java index 015f7751ea..305bb3dd90 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java @@ -30,7 +30,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor; import org.sleuthkit.autopsy.coreutils.DriveUtils; -import org.sleuthkit.autopsy.corecomponentinterfaces.AutoIngestDataSourceProcessor; +import org.sleuthkit.autopsy.framework.AutoIngestDataSourceProcessor; /** * A local drive data source processor that implements the DataSourceProcessor diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesDSProcessor.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesDSProcessor.java index 9c19cb2cfc..e207734714 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesDSProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesDSProcessor.java @@ -29,7 +29,7 @@ import org.openide.util.lookup.ServiceProviders; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor; -import org.sleuthkit.autopsy.corecomponentinterfaces.AutoIngestDataSourceProcessor; +import org.sleuthkit.autopsy.framework.AutoIngestDataSourceProcessor; /** * A local/logical files and/or directories data source processor that diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java index 39f831c5a1..128ea4a8c3 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,31 +19,33 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Component; +import java.awt.Cursor; import java.awt.Dialog; import java.io.File; import java.text.MessageFormat; +import java.util.concurrent.ExecutionException; import java.util.logging.Level; import javax.swing.JComponent; +import javax.swing.JOptionPane; import javax.swing.SwingWorker; -import javax.swing.SwingUtilities; -import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; -import org.openide.NotifyDescriptor; import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; import org.openide.util.actions.SystemAction; -import org.sleuthkit.autopsy.coreutils.Logger; -import javax.swing.JOptionPane; -import org.sleuthkit.autopsy.casemodule.Case.CaseType; import org.openide.windows.WindowManager; -import java.awt.Cursor; -import java.util.concurrent.ExecutionException; -import org.sleuthkit.autopsy.ingest.IngestManager; +import org.sleuthkit.autopsy.actions.IngestRunningCheck; +import org.sleuthkit.autopsy.casemodule.Case.CaseType; +import org.sleuthkit.autopsy.coreutils.FileUtil; +import org.sleuthkit.autopsy.coreutils.Logger; /** - * An action that creates and runs the new case wizard. + * The action associated with the Case/New Case menu item, t toolbar button, and + * the button in the start up window that allows users to open cases action. It + * runs first the New Case wizard, then the Add Data Source wizard. + * + * This action should only be invoked in the event dispatch thread (EDT). */ final class NewCaseWizardAction extends CallableSystemAction { @@ -53,39 +55,15 @@ final class NewCaseWizardAction extends CallableSystemAction { @Override public void performAction() { - /* - * If ingest is running, do a dialog to warn the user and confirm the - * intent to close the current case and leave the ingest process - * incomplete. - */ - if (IngestManager.getInstance().isIngestRunning()) { - NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation( - NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"), - NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning.title"), - NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); - descriptor.setValue(NotifyDescriptor.NO_OPTION); - Object res = DialogDisplayer.getDefault().notify(descriptor); - if (res != null && res == DialogDescriptor.YES_OPTION) { - Case currentCase = null; - try { - currentCase = Case.getCurrentCase(); - currentCase.closeCase(); - } catch (IllegalStateException ignored) { - /* - * No current case. - */ - } catch (CaseActionException ex) { - logger.log(Level.SEVERE, String.format("Error closing case at %s while ingest was running", (null != currentCase ? currentCase.getCaseDirectory() : "?")), ex); //NON-NLS - } - } else { - return; - } + String optionsDlgTitle = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning.title"); + String optionsDlgMessage = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning"); + if (IngestRunningCheck.checkAndConfirmProceed(optionsDlgTitle, optionsDlgMessage)) { + runNewCaseWizard(); } - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - runNewCaseWizard(); } private void runNewCaseWizard() { + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); final WizardDescriptor wizardDescriptor = new WizardDescriptor(getNewCaseWizardPanels()); wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "NewCaseWizardAction.newCase.windowTitle.text")); @@ -101,7 +79,7 @@ final class NewCaseWizardAction extends CallableSystemAction { final String caseName = (String) wizardDescriptor.getProperty("caseName"); //NON-NLS String createdDirectory = (String) wizardDescriptor.getProperty("createdDirectory"); //NON-NLS CaseType caseType = CaseType.values()[(int) wizardDescriptor.getProperty("caseType")]; //NON-NLS - Case.create(createdDirectory, caseName, caseNumber, examiner, caseType); + Case.createAsCurrentCase(createdDirectory, caseName, caseNumber, examiner, caseType); return null; } @@ -109,26 +87,29 @@ final class NewCaseWizardAction extends CallableSystemAction { protected void done() { try { get(); + /* + * Run the Add Data Source wizard by invoking the Add + * Data Source wizard. + */ AddImageAction addImageAction = SystemAction.get(AddImageAction.class); addImageAction.actionPerformed(null); - } catch (Exception ex) { + } catch (InterruptedException | ExecutionException ex) { logger.log(Level.SEVERE, String.format("Error creating case %s", wizardDescriptor.getProperty("caseName")), ex); //NON-NLS - SwingUtilities.invokeLater(() -> { - JOptionPane.showMessageDialog( - WindowManager.getDefault().getMainWindow(), - (ex instanceof ExecutionException ? ex.getCause().getMessage() : ex.getMessage()), - NbBundle.getMessage(this.getClass(), "CaseCreateAction.msgDlg.cantCreateCase.msg"), //NON-NLS - JOptionPane.ERROR_MESSAGE); - StartupWindowProvider.getInstance().close(); // RC: Why close and open? - if (!Case.isCaseOpen()) { - StartupWindowProvider.getInstance().open(); - } - }); + JOptionPane.showMessageDialog( + WindowManager.getDefault().getMainWindow(), + (ex instanceof ExecutionException ? ex.getCause().getMessage() : ex.getMessage()), + NbBundle.getMessage(this.getClass(), "CaseCreateAction.msgDlg.cantCreateCase.msg"), //NON-NLS + JOptionPane.ERROR_MESSAGE); + StartupWindowProvider.getInstance().close(); + StartupWindowProvider.getInstance().open(); doFailedCaseCleanup(wizardDescriptor); + } finally { + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } } }.execute(); } else { + WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); new Thread(() -> { doFailedCaseCleanup(wizardDescriptor); }).start(); @@ -138,11 +119,8 @@ final class NewCaseWizardAction extends CallableSystemAction { private void doFailedCaseCleanup(WizardDescriptor wizardDescriptor) { String createdDirectory = (String) wizardDescriptor.getProperty("createdDirectory"); //NON-NLS if (createdDirectory != null) { - Case.deleteCaseDirectory(new File(createdDirectory)); + FileUtil.deleteDir(new File(createdDirectory)); } - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - }); } /** diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardPanel1.java b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardPanel1.java index 24c1e2a17e..737cbe8839 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardPanel1.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardPanel1.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,9 +23,6 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.logging.Level; - -import org.openide.util.NbBundle; -import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.openide.DialogDescriptor; @@ -34,7 +31,10 @@ import org.openide.NotifyDescriptor; import org.openide.WizardDescriptor; import org.openide.WizardValidationException; import org.openide.util.HelpCtx; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case.CaseType; +import org.sleuthkit.autopsy.coreutils.FileUtil; +import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ModuleSettings; /** @@ -101,7 +101,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel listeners = new HashSet(1); // or can use ChangeSupport in NB 6.0 + private final Set listeners = new HashSet<>(1); // or can use ChangeSupport in NB 6.0 /** * Adds a listener to changes of the panel's validity. @@ -134,7 +134,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel it; synchronized (listeners) { - it = new HashSet(listeners).iterator(); + it = new HashSet<>(listeners).iterator(); } ChangeEvent ev = new ChangeEvent(this); while (it.hasNext()) { @@ -167,15 +167,15 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,9 +27,8 @@ import javax.swing.JTable; import javax.swing.SwingUtilities; import javax.swing.table.AbstractTableModel; import org.openide.util.NbBundle; -import org.sleuthkit.autopsy.coreutils.Logger; import org.openide.windows.WindowManager; -import java.awt.Cursor; +import org.sleuthkit.autopsy.coreutils.Logger; /** * Panel used by the the open recent case option of the start window. @@ -103,7 +102,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel { } final String casePath = casePaths[imagesTable.getSelectedRow()]; final String caseName = caseNames[imagesTable.getSelectedRow()]; - if (!casePath.equals("")) { + if (!casePath.isEmpty()) { try { StartupWindowProvider.getInstance().close(); CueBannerPanel.closeOpenRecentCasesWindow(); @@ -114,34 +113,26 @@ class OpenRecentCasePanel extends javax.swing.JPanel { /* * Open the case. */ - if (caseName.equals("") || casePath.equals("") || (!new File(casePath).exists())) { + if (caseName.isEmpty() || casePath.isEmpty() || (!new File(casePath).exists())) { JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.text", caseName), NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), JOptionPane.ERROR_MESSAGE); RecentCases.getInstance().removeRecentCase(caseName, casePath); // remove the recent case if it doesn't exist anymore - if (Case.isCaseOpen() == false) { - StartupWindowProvider.getInstance().open(); - } + StartupWindowProvider.getInstance().open(); } else { - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - }); new Thread(() -> { try { - Case.open(casePath); + Case.openAsCurrentCase(casePath); } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", casePath), ex); //NON-NLS SwingUtilities.invokeLater(() -> { - logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", casePath), ex); //NON-NLS - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); JOptionPane.showMessageDialog( WindowManager.getDefault().getMainWindow(), ex.getMessage(), // Should be user-friendly NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), //NON-NLS - JOptionPane.ERROR_MESSAGE); - if (!Case.isCaseOpen()) { - StartupWindowProvider.getInstance().open(); - } + JOptionPane.ERROR_MESSAGE); + StartupWindowProvider.getInstance().open(); }); } }).start(); @@ -160,7 +151,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel { public int getRowCount() { int count = 0; for (String s : caseNames) { - if (!s.equals("")) { + if (!s.isEmpty()) { count++; } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java b/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java index 2204da444a..9ea9214c36 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,13 +30,13 @@ import java.util.List; import java.util.logging.Level; import javax.swing.JMenuItem; import org.apache.commons.lang.ArrayUtils; +import org.openide.filesystems.FileUtil; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; import org.openide.util.actions.Presenter; -import org.openide.filesystems.FileUtil; -import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.autopsy.coreutils.ModuleSettings; /** * The action in this class is to clear the list of "Recent Cases". The @@ -45,14 +45,13 @@ import org.sleuthkit.autopsy.coreutils.Logger; */ final class RecentCases extends CallableSystemAction implements Presenter.Menu { - static final int LENGTH = 6; - static final String NAME_PROP_KEY = "LBL_RecentCase_Name"; //NON-NLS - static final String PATH_PROP_KEY = "LBL_RecentCase_Path"; //NON-NLS - static final RecentCase BLANK_RECENTCASE = new RecentCase("", ""); - - private final static RecentCases INSTANCE = new RecentCases(); - - private Deque recentCases; // newest case is last case + private static final long serialVersionUID = 1L; + private static final int LENGTH = 6; + private static final String NAME_PROP_KEY = "LBL_RecentCase_Name"; //NON-NLS + private static final String PATH_PROP_KEY = "LBL_RecentCase_Path"; //NON-NLS + private static final RecentCase BLANK_RECENTCASE = new RecentCase("", ""); + private final static RecentCases instance = new RecentCases(); + private final Deque recentCases; // newest case is last case /** * Gets the instance of the RecentCases singleton. @@ -61,8 +60,8 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { * @return INSTANCE the RecentCases singleton */ static public RecentCases getInstance() { - INSTANCE.refreshRecentCases(); - return INSTANCE; + instance.refreshRecentCases(); + return instance; } /** @@ -84,7 +83,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { } // Load recentCases from properties - recentCases = new LinkedList(); + recentCases = new LinkedList<>(); for (int i = 0; i < LENGTH; i++) { final RecentCase rc = new RecentCase(getName(i), getPath(i)); @@ -175,7 +174,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { * @return true if the case exists, false otherwise */ boolean exists() { - return !(name.equals("") || path.equals("") || !new File(path).exists()); + return !(name.isEmpty() || path.isEmpty() || !new File(path).exists()); } // netbeans autogenerated hashCode @@ -211,7 +210,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { * exist. */ private void refreshRecentCases() { - List toDelete = new ArrayList(); + List toDelete = new ArrayList<>(); for (RecentCase rc : recentCases) { if (!rc.exists()) { toDelete.add(rc); @@ -256,14 +255,14 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { */ @Override public void actionPerformed(ActionEvent e) { - UpdateRecentCases.hasRecentCase = false; + UpdateRecentCases.setHasRecentCase(false); recentCases.clear(); try { // clear the properties file storeRecentCases(); - } catch (Exception ex) { + } catch (IOException ex) { Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not clear the properties file.", ex); //NON-NLS } } @@ -297,7 +296,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { try { storeRecentCases(); - } catch (Exception ex) { + } catch (IOException ex) { Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex); //NON-NLS } } @@ -325,7 +324,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { try { storeRecentCases(); - } catch (Exception ex) { + } catch (IOException ex) { Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex); //NON-NLS } } @@ -357,7 +356,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { // write the properties file try { storeRecentCases(); - } catch (Exception ex) { + } catch (IOException ex) { Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex); //NON-NLS } } @@ -375,7 +374,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu { int i = 0; String currentCaseName = null; try { - currentCaseName = Case.getCurrentCase().getName(); + currentCaseName = Case.getCurrentCase().getDisplayName(); } catch (IllegalStateException ex) { // in case there is no current case. } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java b/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java index 2df4401ad9..d46fce31cb 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,111 +18,61 @@ */ package org.sleuthkit.autopsy.casemodule; -import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.io.File; +import java.util.logging.Level; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import org.openide.util.NbBundle; import org.openide.windows.WindowManager; -import java.awt.Cursor; -import java.util.logging.Level; -import org.openide.DialogDescriptor; -import org.openide.DialogDisplayer; -import org.openide.NotifyDescriptor; +import org.sleuthkit.autopsy.actions.IngestRunningCheck; import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.autopsy.ingest.IngestManager; /** - * An action listener that opens a recent case. + * An action listener for a specific case, associated with a Recent Cases menu + * item for the case by a DynamicMenuContent content JMenuItem. + * + * This action should only be invoked in the event dispatch thread (EDT). */ class RecentItems implements ActionListener { private static final Logger logger = Logger.getLogger(RecentItems.class.getName()); - private final String caseName; private final String caseMetaDataFilePath; /** - * Constructs an action listener that opens a recent case. + * Constructs an action listener for a specific case, associated with a + * Recent Cases menu item for the case by a DynamicMenuContent content + * JMenuItem. * * @param caseName The name of the case. * @param caseMetaDataFilePath The path to the case metadata file. */ - public RecentItems(String caseName, String caseMetaDataFilePath) { - this.caseName = caseName; + RecentItems(String caseName, String caseMetaDataFilePath) { this.caseMetaDataFilePath = caseMetaDataFilePath; } /** - * Opens the recent case. + * Opens the case associated with the action. * * @param e the action event */ @Override public void actionPerformed(ActionEvent e) { - /* - * If ingest is running, do a dialog to warn the user and confirm the - * intent to close the current case and leave the ingest process - * incomplete. - */ - if (IngestManager.getInstance().isIngestRunning()) { - NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation( - NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning"), - NbBundle.getMessage(this.getClass(), "CloseCaseWhileIngesting.Warning.title"), - NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); - descriptor.setValue(NotifyDescriptor.NO_OPTION); - Object res = DialogDisplayer.getDefault().notify(descriptor); - if (res != null && res == DialogDescriptor.YES_OPTION) { - Case currentCase = null; - try { - currentCase = Case.getCurrentCase(); - currentCase.closeCase(); - } catch (IllegalStateException ignored) { - /* - * No current case. - */ - } catch (CaseActionException ex) { - logger.log(Level.SEVERE, String.format("Error closing case at %s while ingest was running", (null!= currentCase ? currentCase.getCaseDirectory() : "?")),ex); //NON-NLS - } - } else { - return; - } - } - - /* - * Open the case. - */ - if (caseName.equals("") || caseMetaDataFilePath.equals("") || (!new File(caseMetaDataFilePath).exists())) { - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), - NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.text", caseName), - NbBundle.getMessage(this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), - JOptionPane.ERROR_MESSAGE); - RecentCases.getInstance().removeRecentCase(caseName, caseMetaDataFilePath); - if (Case.isCaseOpen() == false) { - EventQueue.invokeLater(() -> { - StartupWindowProvider.getInstance().open(); - }); - } - } else { - SwingUtilities.invokeLater(() -> { - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - }); + String optionsDlgTitle = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning.title"); + String optionsDlgMessage = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning"); + if (IngestRunningCheck.checkAndConfirmProceed(optionsDlgTitle, optionsDlgMessage)) { new Thread(() -> { try { - Case.open(caseMetaDataFilePath); + Case.openAsCurrentCase(caseMetaDataFilePath); } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", caseMetaDataFilePath), ex); //NON-NLS SwingUtilities.invokeLater(() -> { - logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", caseMetaDataFilePath), ex); //NON-NLS - WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); JOptionPane.showMessageDialog( WindowManager.getDefault().getMainWindow(), - ex.getMessage(), // Should be user-friendly + ex.getMessage(), NbBundle.getMessage(RecentItems.this.getClass(), "CaseOpenAction.msgDlg.cantOpenCase.title"), //NON-NLS JOptionPane.ERROR_MESSAGE); - if (!Case.isCaseOpen()) { - StartupWindowProvider.getInstance().open(); - } + StartupWindowProvider.getInstance().open(); }); } }).start(); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseConverter.java b/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseConverter.java index e39f0d5ebb..6d57f3daac 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseConverter.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseConverter.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,19 +34,21 @@ import java.util.Date; import org.apache.commons.io.FileUtils; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case.CaseType; -import static org.sleuthkit.autopsy.casemodule.Case.MODULE_FOLDER; import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.core.UserPreferencesException; +import org.sleuthkit.autopsy.coreutils.NetworkUtils; import org.sleuthkit.datamodel.CaseDbConnectionInfo; import org.sleuthkit.datamodel.SleuthkitCase; -import org.sleuthkit.autopsy.coreutils.NetworkUtils; import org.sleuthkit.datamodel.TskData; /** * Import a case from single-user to multi-user. + * + * DO NOT USE, NEEDS TO BE UPDATED */ public class SingleUserCaseConverter { + private static final String MODULE_FOLDER = "ModuleOutput"; //NON-NLS private static final String AUTOPSY_DB_FILE = "autopsy.db"; //NON-NLS private static final String DOTAUT = CaseMetadata.getFileExtension(); //NON-NLS private static final String TIMELINE_FOLDER = "Timeline"; //NON-NLS @@ -176,7 +178,6 @@ public class SingleUserCaseConverter { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); //NON-NLS Date date = new Date(); String dbName = Case.sanitizeCaseName(icd.getNewCaseName()) + "_" + dateFormat.format(date); //NON-NLS - String solrName = dbName; icd.setPostgreSQLDbName(dbName); // Copy items to new hostname folder structure @@ -195,9 +196,10 @@ public class SingleUserCaseConverter { CaseMetadata newCaseMetadata = new CaseMetadata(icd.getCaseOutputFolder().toString(), CaseType.MULTI_USER_CASE, icd.getNewCaseName(), + icd.getNewCaseName(), oldCaseMetadata.getCaseNumber(), oldCaseMetadata.getExaminer(), - dbName, solrName); + dbName); // Set created date. This calls writefile, no need to call it again newCaseMetadata.setCreatedDate(oldCaseMetadata.getCreatedDate()); newCaseMetadata.setCreatedByVersion(oldCaseMetadata.getCreatedByVersion()); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/IntervalErrorReportData.java b/Core/src/org/sleuthkit/autopsy/casemodule/SleuthkitErrorReporter.java similarity index 65% rename from Core/src/org/sleuthkit/autopsy/casemodule/IntervalErrorReportData.java rename to Core/src/org/sleuthkit/autopsy/casemodule/SleuthkitErrorReporter.java index 52ea056333..15deff10d6 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/IntervalErrorReportData.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/SleuthkitErrorReporter.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,51 +18,43 @@ */ package org.sleuthkit.autopsy.casemodule; +import java.util.logging.Level; import org.openide.util.NbBundle; +import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; +import org.sleuthkit.datamodel.SleuthkitCase; /** - * This class enables capturing errors and batching them for reporting on a - * no-more-than-x number of seconds basis. When created, you specify the minimum - * time between user notifications. When the time between notifications has - * expired, the next error encountered will cause a report to be shown to the - * user. + * Acts as a bridge between the Sleuthkit Java bindings classes and Autopsy by + * implementing the SleuthkitCase$ErrorObserver interface. All errors are + * written to the Autopsy logs. If a GUI is running, errors are also batched up + * and reported periodically to the user via the notification area in the lower + * right hand corner of the main application window. */ -class IntervalErrorReportData { +class SleuthkitErrorReporter implements SleuthkitCase.ErrorObserver { - private final Case currentCase; + private static final Logger LOGGER = Logger.getLogger(SleuthkitErrorReporter.class.getName()); + private final int milliSecondsBetweenReports; + private final String message; private long newProblems; private long totalProblems; private long lastReportedDate; - private final int milliSecondsBetweenReports; - private final String message; /** * Create a new IntervalErrorReprotData instance and subscribe for TSK error * notifications for the current case. * - * @param currentCase Case for which TSK errors should be tracked - * and displayed. * @param secondsBetweenReports Minimum number of seconds between reports. * It will not warn more frequently than this. * @param message The message that will be shown when warning - * the user + * the user. */ - IntervalErrorReportData(Case currentCase, int secondsBetweenReports, String message) { + SleuthkitErrorReporter(int secondsBetweenReports, String message) { this.newProblems = 0; this.totalProblems = 0; this.lastReportedDate = 0; // arm the first warning by choosing zero this.milliSecondsBetweenReports = secondsBetweenReports * 1000; // convert to milliseconds this.message = message; - this.currentCase = currentCase; - this.currentCase.getSleuthkitCase().addErrorObserver(this.currentCase); - } - - /** - * Un-subscribe from TSK error notifications for current case. - */ - void shutdown() { - this.currentCase.getSleuthkitCase().removeErrorObserver(this.currentCase); } /** @@ -73,18 +65,19 @@ class IntervalErrorReportData { * @param context The context in which the error occurred. * @param errorMessage A description of the error that occurred. */ - void addProblems(String context, String errorMessage) { + @Override + public void receiveError(String context, String errorMessage) { + LOGGER.log(Level.SEVERE, String.format("%s error in the SleuthKit layer: %s", context, errorMessage)); this.newProblems += 1; this.totalProblems += newProblems; - long currentTimeStamp = System.currentTimeMillis(); if ((currentTimeStamp - lastReportedDate) > milliSecondsBetweenReports) { this.lastReportedDate = currentTimeStamp; MessageNotifyUtil.Notify.error(message, context + ", " + errorMessage + " " + this.newProblems + " " - + NbBundle.getMessage(IntervalErrorReportData.class, "IntervalErrorReport.NewIssues") + + NbBundle.getMessage(SleuthkitErrorReporter.class, "IntervalErrorReport.NewIssues") + " " + this.totalProblems + " " - + NbBundle.getMessage(IntervalErrorReportData.class, "IntervalErrorReport.TotalIssues") + + NbBundle.getMessage(SleuthkitErrorReporter.class, "IntervalErrorReport.TotalIssues") + "."); this.newProblems = 0; } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java index d609c9359f..8b94b0d441 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,25 +19,22 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Dimension; -import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JDialog; -import javax.swing.JFrame; - import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; import org.openide.windows.WindowManager; /** - * The default implementation of the Autopsy startup window + * The default implementation of the Autopsy startup window. */ @ServiceProvider(service = StartupWindowInterface.class) public final class StartupWindow extends JDialog implements StartupWindowInterface { - private static StartupWindow instance; + private static final long serialVersionUID = 1L; private static final String TITLE = NbBundle.getMessage(StartupWindow.class, "StartupWindow.title.text"); - private static Dimension DIMENSIONS = new Dimension(750, 400); + private static final Dimension DIMENSIONS = new Dimension(750, 400); private static CueBannerPanel welcomeWindow; public StartupWindow() { @@ -45,37 +42,18 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa init(); } - /** - * Shows the startup window. - */ private void init() { - - Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); - - // set the popUp window / JFrame setSize(DIMENSIONS); - int w = this.getSize().width; - int h = this.getSize().height; - - // set the location of the popUp Window on the center of the screen - setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); - setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - welcomeWindow = new CueBannerPanel(); - - // add the command to close the window to the button on the Volume Detail Panel welcomeWindow.setCloseButtonActionListener(new ActionListener() { - @Override public void actionPerformed(ActionEvent e) { close(); } }); - add(welcomeWindow); pack(); setResizable(false); - } @Override @@ -85,9 +63,6 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa setVisible(true); } - /** - * Closes the startup window. - */ @Override public void close() { this.setVisible(false); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java b/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java index 4d00a60606..29be82fe48 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,17 +30,22 @@ import org.openide.util.actions.SystemAction; */ class UpdateRecentCases extends JMenuItem implements DynamicMenuContent { - int length; - static boolean hasRecentCase = false; + private static final long serialVersionUID = 1L; + private static int NUM_CASES_TO_DISPLAY; + private static boolean hasRecentCase = false; /** * the constructor */ UpdateRecentCases() { // display last 5 cases. - length = RecentCases.LENGTH - 1; + NUM_CASES_TO_DISPLAY = 5; } + static void setHasRecentCase(boolean value) { + hasRecentCase = value; + } + /** * Creates main menu/popup menu items. Null values will be later replaced by * JSeparators. This method is called for popups and for menus. It's called @@ -53,10 +58,10 @@ class UpdateRecentCases extends JMenuItem implements DynamicMenuContent { public JComponent[] getMenuPresenters() { String[] caseName = RecentCases.getInstance().getRecentCaseNames(); String[] casePath = RecentCases.getInstance().getRecentCasePaths(); - JComponent[] comps = new JComponent[length + 2]; // + 2 for separator and clear menu + JComponent[] comps = new JComponent[NUM_CASES_TO_DISPLAY + 2]; // + 2 for separator and clear menu // if it has the recent menus, add them to the component list - for (int i = 0; i < length; i++) { + for (int i = 0; i < NUM_CASES_TO_DISPLAY; i++) { if ((!caseName[i].equals(""))) { JMenuItem menuItem = new JMenuItem(caseName[i]); menuItem.setActionCommand(caseName[i].toUpperCase()); @@ -68,11 +73,11 @@ class UpdateRecentCases extends JMenuItem implements DynamicMenuContent { // if it has recent case, create clear menu if (hasRecentCase) { - comps[length] = new JSeparator(); + comps[NUM_CASES_TO_DISPLAY] = new JSeparator(); JMenuItem clearMenu = new JMenuItem( NbBundle.getMessage(UpdateRecentCases.class, "UpdateRecentCases.menuItem.clearRecentCases.text")); clearMenu.addActionListener(SystemAction.get(RecentCases.class)); - comps[length + 1] = clearMenu; + comps[NUM_CASES_TO_DISPLAY + 1] = clearMenu; } // otherwise, just create a disabled empty menu else { comps = new JComponent[1]; @@ -85,17 +90,15 @@ class UpdateRecentCases extends JMenuItem implements DynamicMenuContent { } /** - * Updates main menu presenters. This method is called only by the main menu - * processing. + * Updates the Recent Cases menu items. * - * @param jcs the previously used menu items returned by previous call to - * getMenuPresenters() or synchMenuPresenters() + * @param menuItems A set of Recent Case menu items to be updated. * - * @return menu a new set of items to show in menu. Can be either an updated - * old set of instances or a completely new one. + * @return A updated set of recent case menu items to show in the Recent + * Cases menu. */ @Override - public JComponent[] synchMenuPresenters(JComponent[] jcs) { + public JComponent[] synchMenuPresenters(JComponent[] menuItems) { return getMenuPresenters(); } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/Services.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/Services.java index a8d11d184c..c38bc12144 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/Services.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/Services.java @@ -2,7 +2,7 @@ * * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * Copyright 2012 42six Solutions. * Contact: aebadirad 42six com diff --git a/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationService.java b/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationService.java index 39c5c25ba6..e546e4d260 100644 --- a/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationService.java +++ b/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationService.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,129 +18,89 @@ */ package org.sleuthkit.autopsy.coordinationservice; +import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; -import org.apache.zookeeper.CreateMode; -import org.apache.zookeeper.ZooDefs; import org.apache.curator.RetryPolicy; -import org.apache.curator.retry.ExponentialBackoffRetry; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.framework.recipes.locks.InterProcessMutex; import org.apache.curator.framework.recipes.locks.InterProcessReadWriteLock; +import org.apache.curator.retry.ExponentialBackoffRetry; +import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; -import org.sleuthkit.autopsy.core.UserPreferences; -import java.io.IOException; -import org.apache.zookeeper.WatchedEvent; -import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.KeeperException.NoNodeException; +import org.apache.zookeeper.WatchedEvent; +import org.apache.zookeeper.ZooDefs; +import org.apache.zookeeper.ZooKeeper; +import org.sleuthkit.autopsy.core.UserPreferences; /** - * A centralized service for maintaining configuration information and providing - * distributed synchronization using a shared hierarchical namespace of nodes. + * A coordination service for maintaining configuration information and + * providing distributed synchronization using a shared hierarchical namespace + * of nodes. + * + * TODO (JIRA 2205): Simple refactoring for general use. */ public final class CoordinationService { - /** - * Category nodes are the immediate children of the root node of a shared - * hierarchical namespace managed by the coordination service. - */ - public enum CategoryNode { // RJCTODO: Move this to CoordinationServiceNamespace - - CASES("cases"), - MANIFESTS("manifests"), - CONFIG("config"), - RESOURCE("resource"); - - private final String displayName; - - private CategoryNode(String displayName) { - this.displayName = displayName; - } - - public String getDisplayName() { - return displayName; - } - } - - /** - * Exception type thrown by the coordination service. - */ - public final static class CoordinationServiceException extends Exception { - - private static final long serialVersionUID = 1L; - - private CoordinationServiceException(String message) { - super(message); - } - - private CoordinationServiceException(String message, Throwable cause) { - super(message, cause); - } - } - - /** - * An opaque encapsulation of a lock for use in distributed synchronization. - * Instances are obtained by calling a get lock method and must be passed to - * a release lock method. - */ - public static class Lock implements AutoCloseable { - - /** - * This implementation uses the Curator read/write lock. see - * http://curator.apache.org/curator-recipes/shared-reentrant-read-write-lock.html - */ - private final InterProcessMutex interProcessLock; - private final String nodePath; - - private Lock(String nodePath, InterProcessMutex lock) { - this.nodePath = nodePath; - this.interProcessLock = lock; - } - - public String getNodePath() { - return nodePath; - } - - public void release() throws CoordinationServiceException { - try { - this.interProcessLock.release(); - } catch (Exception ex) { - throw new CoordinationServiceException(String.format("Failed to release the lock on %s", nodePath), ex); - } - } - - @Override - public void close() throws CoordinationServiceException { - release(); - } - } - private static CuratorFramework curator = null; private static final Map rootNodesToServices = new HashMap<>(); - private final Map categoryNodeToPath = new HashMap<>(); private static final int SESSION_TIMEOUT_MILLISECONDS = 300000; private static final int CONNECTION_TIMEOUT_MILLISECONDS = 300000; private static final int ZOOKEEPER_SESSION_TIMEOUT_MILLIS = 3000; private static final int ZOOKEEPER_CONNECTION_TIMEOUT_MILLIS = 15000; - private static final int PORT_OFFSET = 1000; + private static final int PORT_OFFSET = 1000; // When run in Solr, ZooKeeper defaults to Solr port + 1000 + private final Map categoryNodeToPath = new HashMap<>(); /** - * Gets an instance of the centralized coordination service for a specific - * namespace. + * Determines if ZooKeeper is accessible with the current settings. Closes + * the connection prior to returning. + * + * @return true if a connection was achieved, false otherwise + * + * @throws InterruptedException + * @throws IOException + */ + private static boolean isZooKeeperAccessible() throws InterruptedException, IOException { + boolean result = false; + Object workerThreadWaitNotifyLock = new Object(); + int zooKeeperServerPort = Integer.valueOf(UserPreferences.getIndexingServerPort()) + PORT_OFFSET; + String connectString = UserPreferences.getIndexingServerHost() + ":" + zooKeeperServerPort; + ZooKeeper zooKeeper = new ZooKeeper(connectString, ZOOKEEPER_SESSION_TIMEOUT_MILLIS, + (WatchedEvent event) -> { + synchronized (workerThreadWaitNotifyLock) { + workerThreadWaitNotifyLock.notify(); + } + }); + synchronized (workerThreadWaitNotifyLock) { + workerThreadWaitNotifyLock.wait(ZOOKEEPER_CONNECTION_TIMEOUT_MILLIS); + } + ZooKeeper.States state = zooKeeper.getState(); + if (state == ZooKeeper.States.CONNECTED || state == ZooKeeper.States.CONNECTEDREADONLY) { + result = true; + } + zooKeeper.close(); + return result; + } + + /** + * Gets a coordination service for a specific namespace. * * @param rootNode The name of the root node that defines the namespace. * - * @return The service for the namespace defined by the root node name. + * @return The coordination service. * - * @throws CoordinationServiceException If an instaNce of the coordination + * @throws CoordinationServiceException If an instance of the coordination * service cannot be created. */ - public static synchronized CoordinationService getInstance(String rootNode) throws CoordinationServiceException { + public static synchronized CoordinationService getServiceForNamespace(String rootNode) throws CoordinationServiceException { + /* + * Connect to ZooKeeper via Curator. + */ if (null == curator) { RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3); - // When run in Solr, ZooKeeper defaults to Solr port + 1000 int zooKeeperServerPort = Integer.valueOf(UserPreferences.getIndexingServerPort()) + PORT_OFFSET; String connectString = UserPreferences.getIndexingServerHost() + ":" + zooKeeperServerPort; curator = CuratorFrameworkFactory.newClient(connectString, SESSION_TIMEOUT_MILLISECONDS, CONNECTION_TIMEOUT_MILLISECONDS, retryPolicy); @@ -157,7 +117,7 @@ public final class CoordinationService { CoordinationService service; try { service = new CoordinationService(rootNode); - } catch (Exception ex) { + } catch (IOException | InterruptedException | KeeperException | CoordinationServiceException ex) { curator = null; throw new CoordinationServiceException("Failed to create coordination service", ex); } @@ -167,15 +127,18 @@ public final class CoordinationService { } /** - * Constructs an instance of the centralized coordination service for a - * specific namespace. + * Constructs an instance of the coordination service for a specific + * namespace. * * @param rootNodeName The name of the root node that defines the namespace. + * + * @throws Exception (calls Curator methods that throw Exception instead of + * more specific exceptions) */ - private CoordinationService(String rootNodeName) throws Exception { + private CoordinationService(String rootNodeName) throws InterruptedException, IOException, KeeperException, CoordinationServiceException { if (false == isZooKeeperAccessible()) { - throw new Exception("Unable to access ZooKeeper"); + throw new CoordinationServiceException("Unable to access ZooKeeper"); } String rootNode = rootNodeName; @@ -191,6 +154,8 @@ public final class CoordinationService { if (ex.code() != KeeperException.Code.NODEEXISTS) { throw ex; } + } catch (Exception ex) { + throw new CoordinationServiceException("Curator experienced an error", ex); } categoryNodeToPath.put(node.getDisplayName(), nodePath); } @@ -201,6 +166,9 @@ public final class CoordinationService { * in the namespace managed by this coordination service. Blocks until the * lock is obtained or the time out expires. * + * IMPORTANT: The lock needs to be released in the same thread in which it + * is acquired. + * * @param category The desired category in the namespace. * @param nodePath The node path to use as the basis for the lock. * @param timeOut Length of the time out. @@ -236,6 +204,9 @@ public final class CoordinationService { * in the namespace managed by this coordination service. Returns * immediately if the lock can not be acquired. * + * IMPORTANT: The lock needs to be released in the same thread in which it + * is acquired. + * * @param category The desired category in the namespace. * @param nodePath The node path to use as the basis for the lock. * @@ -262,6 +233,9 @@ public final class CoordinationService { * the namespace managed by this coordination service. Blocks until the lock * is obtained or the time out expires. * + * IMPORTANT: The lock needs to be released in the same thread in which it + * is acquired. + * * @param category The desired category in the namespace. * @param nodePath The node path to use as the basis for the lock. * @param timeOut Length of the time out. @@ -297,6 +271,9 @@ public final class CoordinationService { * the namespace managed by this coordination service. Returns immediately * if the lock can not be acquired. * + * IMPORTANT: The lock needs to be released in the same thread in which it + * is acquired. + * * @param category The desired category in the namespace. * @param nodePath The node path to use as the basis for the lock. * @@ -385,35 +362,77 @@ public final class CoordinationService { } /** - * Determines if ZooKeeper is accessible with the current settings. Closes - * the connection prior to returning. - * - * @return true if a connection was achieved, false otherwise + * Exception type thrown by the coordination service. */ - private static boolean isZooKeeperAccessible() { - boolean result = false; - Object workerThreadWaitNotifyLock = new Object(); - int zooKeeperServerPort = Integer.valueOf(UserPreferences.getIndexingServerPort()) + PORT_OFFSET; - String connectString = UserPreferences.getIndexingServerHost() + ":" + zooKeeperServerPort; + public final static class CoordinationServiceException extends Exception { - try { - ZooKeeper zooKeeper = new ZooKeeper(connectString, ZOOKEEPER_SESSION_TIMEOUT_MILLIS, - (WatchedEvent event) -> { + private static final long serialVersionUID = 1L; - synchronized (workerThreadWaitNotifyLock) { - workerThreadWaitNotifyLock.notify(); - } - }); - synchronized (workerThreadWaitNotifyLock) { - workerThreadWaitNotifyLock.wait(ZOOKEEPER_CONNECTION_TIMEOUT_MILLIS); - } - ZooKeeper.States state = zooKeeper.getState(); - if (state == ZooKeeper.States.CONNECTED || state == ZooKeeper.States.CONNECTEDREADONLY) { - result = true; - } - zooKeeper.close(); - } catch (InterruptedException | IOException ignored) { + private CoordinationServiceException(String message) { + super(message); + } + + private CoordinationServiceException(String message, Throwable cause) { + super(message, cause); + } + } + + /** + * An opaque encapsulation of a lock for use in distributed synchronization. + * Instances are obtained by calling a get lock method and must be passed to + * a release lock method. + */ + public static class Lock implements AutoCloseable { + + /** + * This implementation uses the Curator read/write lock. see + * http://curator.apache.org/curator-recipes/shared-reentrant-read-write-lock.html + */ + private final InterProcessMutex interProcessLock; + private final String nodePath; + + private Lock(String nodePath, InterProcessMutex lock) { + this.nodePath = nodePath; + this.interProcessLock = lock; + } + + public String getNodePath() { + return nodePath; + } + + public void release() throws CoordinationServiceException { + try { + this.interProcessLock.release(); + } catch (Exception ex) { + throw new CoordinationServiceException(String.format("Failed to release the lock on %s", nodePath), ex); + } + } + + @Override + public void close() throws CoordinationServiceException { + release(); + } + } + + /** + * Category nodes are the immediate children of the root node of a shared + * hierarchical namespace managed by a coordination service. + */ + public enum CategoryNode { + + CASES("cases"), + MANIFESTS("manifests"), + CONFIG("config"), + RESOURCE("resource"); + + private final String displayName; + + private CategoryNode(String displayName) { + this.displayName = displayName; + } + + public String getDisplayName() { + return displayName; } - return result; } } diff --git a/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationServiceNamespace.java b/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationServiceNamespace.java index e1f2a3df42..567dd38bc6 100644 --- a/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationServiceNamespace.java +++ b/Core/src/org/sleuthkit/autopsy/coordinationservice/CoordinationServiceNamespace.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015 Basis Technology Corp. + * Copyright 2016-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,7 +19,7 @@ package org.sleuthkit.autopsy.coordinationservice; /** - * Namespace elements for auto ingest coordination service nodes. + * Root node for Autopsy coordination service namespace. */ public final class CoordinationServiceNamespace { private static final String ROOT = "autopsy"; diff --git a/Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java b/Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java index 1ad74738dc..17999cc363 100644 --- a/Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java +++ b/Core/src/org/sleuthkit/autopsy/core/RuntimeProperties.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2013-2015 Basis Technology Corp. + * Copyright 2013-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,46 +24,70 @@ package org.sleuthkit.autopsy.core; */ public class RuntimeProperties { - private static boolean coreComponentsActive = true; - private static boolean coreComponentsActiveSet = false; + private static boolean runningWithGUI = true; + private static boolean runningWithGUIFlagHasBeenSet = false; /** - * Sets or unsets a flag indicating whether or not the core Autopsy UI - * components and user interactions with those components via menus, message - * boxes, NetBeans progress handles, etc., are enabled. - *

- * This flag exists as a mechanism to allow use of Autopsy as a platform - * with the core Autopsy user interface disabled, until such time as the - * user interface is made separable and optional. + * Sets or unsets a flag indicating whether or not the application is + * running with a GUI. The flag can only be set once per application + * innvocation. * - * @param coreComponentsActive True or false. + * @param runningWithGUI True or false. + * + * @throws RuntimePropertiesException if the flag has already been set. */ - public synchronized static void setCoreComponentsActive(boolean coreComponentsActive) { - if (!coreComponentsActiveSet) { - RuntimeProperties.coreComponentsActive = coreComponentsActive; - coreComponentsActiveSet = true; + public synchronized static void setRunningWithGUI(boolean runningWithGUI) throws RuntimePropertiesException { + if (!runningWithGUIFlagHasBeenSet) { + RuntimeProperties.runningWithGUI = runningWithGUI; + runningWithGUIFlagHasBeenSet = true; + } else { + throw new RuntimePropertiesException("The runningWithGUI flag has already been set and cannot be changed"); } } /** - * Gets a flag indicating whether or not the core Autopsy UI components and - * user interactions with those components via menus, message boxes, - * NetBeans progress handles, etc., are enabled. - *

- * This flag exists as a mechanism to allow use of Autopsy as a platform - * with the core Autopsy user interface disabled, until such time as the - * user interface is made separable and optional. + * Gets a flag indicating whether or not the application is running with a + * GUI. * * @return True or false. */ - public synchronized static boolean coreComponentsAreActive() { - return coreComponentsActive; + public synchronized static boolean runningWithGUI() { + return runningWithGUI; } - + /** * Private constructor to prevent creation of instances of this class. */ private RuntimeProperties() { - } + + /** + * Exception to throw if there is an error setting a runtime property. + */ + public final static class RuntimePropertiesException extends Exception { + + private static final long serialVersionUID = 1L; + + /** + * Constructor for an exception to throw if there is an error setting + * a runtime property. + * + * @param message The exception message. + */ + public RuntimePropertiesException(String message) { + super(message); + } + + /** + * Constructor for an exception to throw if there is an error setting + * a runtime property. + * + * @param message The exception message. + * @param cause The cause of the error. + */ + public RuntimePropertiesException(String message, Throwable cause) { + super(message, cause); + } + } + } diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties index 51e0ac87d3..1aa7a3b24e 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties @@ -1,7 +1,7 @@ CTL_DataContentAction=DataContent CTL_DataContentTopComponent=Data Content CTL_CustomAboutAction=About -OptionsCategory_Name_General=Autopsy +OptionsCategory_Name_General=View OptionsCategory_Keywords_General=Autopsy Options HINT_DataContentTopComponent=This is a DataContent window HINT_NodeTableTopComponent=This is a DataResult window diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties index abb22c4ce8..46544c99b2 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties @@ -1,5 +1,4 @@ CTL_DataContentAction=\u30c7\u30fc\u30bf\u30b3\u30f3\u30c6\u30f3\u30c4 -OptionsCategory_Name_General=Autopsy OptionsCategory_Keywords_General=Autopsy\u30aa\u30d7\u30b7\u30e7\u30f3 CTL_CustomAboutAction=Autopsy\u306b\u3064\u3044\u3066 CTL_DataContentTopComponent=\u30c7\u30fc\u30bf\u30b3\u30f3\u30c6\u30f3\u30c4 diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentTopComponent.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentTopComponent.java index 83532c70ed..6f7c87ad0b 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentTopComponent.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,7 +22,6 @@ import java.beans.PropertyChangeEvent; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; -import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.JTabbedPane; import org.openide.nodes.Node; import org.openide.util.NbBundle; @@ -30,6 +29,7 @@ import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent; +import org.sleuthkit.autopsy.coreutils.Logger; /** * Top component that organizes all of the data content viewers. Doing a lookup @@ -42,17 +42,18 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent; //@TopComponent.OpenActionRegistration(displayName = "#CTL_DataContentAction", preferredID = "DataContentTopComponent") public final class DataContentTopComponent extends TopComponent implements DataContent { - private static Logger logger = Logger.getLogger(DataContentTopComponent.class.getName()); + private static final Logger logger = Logger.getLogger(DataContentTopComponent.class.getName()); // reference to the "default" TC that always stays open private static DataContentTopComponent defaultInstance; + private static final long serialVersionUID = 1L; // set to true if this is the TC that always stays open and is the default place to display content - private boolean isDefault; + private final boolean isDefault; // the content panel holding tabs with content viewers private final DataContentPanel dataContentPanel; // contains a list of the undocked TCs - private static ArrayList newWindowList = new ArrayList(); + private static final ArrayList newWindowList = new ArrayList<>(); private static final String PREFERRED_ID = "DataContentTopComponent"; //NON-NLS private static final String DEFAULT_NAME = NbBundle.getMessage(DataContentTopComponent.class, "CTL_DataContentTopComponent"); private static final String TOOLTIP_TEXT = NbBundle.getMessage(DataContentTopComponent.class, "HINT_DataContentTopComponent"); @@ -67,8 +68,8 @@ public final class DataContentTopComponent extends TopComponent implements DataC dataContentPanel = new DataContentPanel(isDefault); add(dataContentPanel); - putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.valueOf(isDefault)); // prevent option to close compoment in GUI - logger.log(Level.INFO, "Created DataContentTopComponent instance: " + this); //NON-NLS + putClientProperty(TopComponent.PROP_CLOSING_DISABLED, isDefault); // prevent option to close compoment in GUI + logger.log(Level.INFO, "Created DataContentTopComponent instance: {0}", this); //NON-NLS } /** @@ -91,24 +92,13 @@ public final class DataContentTopComponent extends TopComponent implements DataC return dctc; } - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - - setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS)); - }// //GEN-END:initComponents - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables - /** * Gets default instance. Do not use directly: reserved for *.settings files * only, i.e. deserialization routines; otherwise you could get a * non-deserialized defaultInstance. To obtain the singleton instance, use - * {@link #findInstance}. + * findInstance. + * + * @return */ public static synchronized DataContentTopComponent getDefault() { if (defaultInstance == null) { @@ -118,8 +108,10 @@ public final class DataContentTopComponent extends TopComponent implements DataC } /** - * Obtain the default DataContentTopComponent defaultInstance. Never call - * {@link #getDefault} directly! + * Obtain the default DataContentTopComponent default instance. Never call + * getDefault directly! + * + * @return The default DataContentTopComponent. */ public static synchronized DataContentTopComponent findInstance() { TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID); @@ -171,7 +163,12 @@ public final class DataContentTopComponent extends TopComponent implements DataC @Override public boolean canClose() { - return (!this.isDefault) || !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; // only allow this window to be closed when there's no case opened or no image in this case + /* + * If this is the main content viewers top component in the bottom of + * the main window, only it to be closed when there's no case opened or + * no data sources in the open case. + */ + return (!this.isDefault) || !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; } @Override @@ -195,4 +192,18 @@ public final class DataContentTopComponent extends TopComponent implements DataC public static List getNewWindowList() { return newWindowList; } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + // //GEN-BEGIN:initComponents + private void initComponents() { + + setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS)); + }// //GEN-END:initComponents + // Variables declaration - do not modify//GEN-BEGIN:variables + // End of variables declaration//GEN-END:variables + } diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java index 4206dddc1d..fa655ee088 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -55,7 +55,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C private ExplorerManager explorerManager; private ExplorerManagerNodeSelectionListener emNodeSelectionListener; - + private Node rootNode; // Different DataResultsViewers @@ -276,7 +276,9 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C @Override public void propertyChange(PropertyChangeEvent evt) { - if (!Case.isCaseOpen()) { + try { + Case.getCurrentCase(); + } catch (IllegalStateException ex) { // Handle the in-between condition when case is being closed // and legacy selection events are pumped. return; @@ -334,7 +336,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C explorerManager.removePropertyChangeListener(emNodeSelectionListener); explorerManager = null; } - + // clear all set nodes for (UpdateWrapper drv : this.viewers) { drv.setNode(null); @@ -443,7 +445,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C @Override public List getViewers() { - List ret = new ArrayList(); + List ret = new ArrayList<>(); for (UpdateWrapper w : viewers) { ret.add(w.getViewer()); } @@ -452,7 +454,12 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C } public boolean canClose() { - return (!this.isMain) || !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; // only allow this window to be closed when there's no case opened or no image in this case + /* + * If this is the main results panel in the main top component in the + * upper right of the main window, only allow it to be closed when + * there's no case opened or no data sources in the open case. + */ + return (!this.isMain) || !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; } @Override diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultTopComponent.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultTopComponent.java index 7761afe04d..e99a2f8aa9 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultTopComponent.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2013 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -314,7 +314,12 @@ public class DataResultTopComponent extends TopComponent implements DataResult, @Override public boolean canClose() { - return (!this.isMain) || !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; // only allow this window to be closed when there's no case opened or no image in this case + /* + * If this is the results top component in the upper right of the main + * window, only allow it to be closed when there's no case opened or no + * data sources in the open case. + */ + return (!this.isMain) || !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; } /** diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java index 34a752a1e8..814e4bf654 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +25,7 @@ import java.util.Map; import java.util.TreeMap; import java.util.logging.Level; import javax.swing.BorderFactory; +import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.UnsupportedLookAndFeelException; @@ -32,7 +33,9 @@ import org.netbeans.spi.sendopts.OptionProcessor; import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI; import org.openide.modules.ModuleInstall; import org.openide.util.Lookup; +import org.openide.util.NbBundle; import org.openide.windows.WindowManager; +import org.sleuthkit.autopsy.actions.IngestRunningCheck; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.CaseActionException; import org.sleuthkit.autopsy.casemodule.CaseMetadata; @@ -50,7 +53,7 @@ public class Installer extends ModuleInstall { private static Installer instance; public synchronized static Installer getDefault() { - if (instance == null) { + if (null == instance) { instance = new Installer(); } return instance; @@ -80,21 +83,18 @@ public class Installer extends ModuleInstall { if (processor instanceof OpenFromArguments) { OpenFromArguments argsProcessor = (OpenFromArguments) processor; final String caseFile = argsProcessor.getDefaultArg(); - if (caseFile != null && !caseFile.equals("") && caseFile.endsWith(CaseMetadata.getFileExtension()) && new File(caseFile).exists()) { //NON-NLS - new Thread(() -> { - try { - Case.open(caseFile); - } catch (Exception ex) { - logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", caseFile), ex); //NON-NLS - } - }).start(); + if (caseFile != null && !caseFile.isEmpty() && caseFile.endsWith(CaseMetadata.getFileExtension()) && new File(caseFile).exists()) { //NON-NLS + try { + Case.openAsCurrentCase(caseFile); + } catch (CaseActionException ex) { + logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", caseFile), ex); //NON-NLS + } return; } } } StartupWindowProvider.getInstance().open(); }); - } @Override @@ -105,19 +105,10 @@ public class Installer extends ModuleInstall { @Override public void close() { new Thread(() -> { - String caseDirName = null; try { - if (Case.isCaseOpen()) { - Case currentCase = Case.getCurrentCase(); - caseDirName = currentCase.getCaseDirectory(); - currentCase.closeCase(); - } + Case.closeCurrentCase(); } catch (CaseActionException ex) { - logger.log(Level.SEVERE, String.format("Error closing case with case directory %s", (null != caseDirName ? caseDirName : "?")), ex); //NON-NLS - } catch (IllegalStateException ignored) { - /* - * No current case. Case.isCaseOpen is not reliable. - */ + logger.log(Level.SEVERE, "Error closing current case", ex); //NON-NLS } }).start(); } diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java index 3d7dabb7a0..f57bc27b9c 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2013-15 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -140,12 +140,12 @@ public class MediaViewImagePanel extends JPanel implements DataContentViewerMedi private void showErrorNode(String errorMessage, AbstractFile file) { final Button externalViewerButton = new Button(Bundle.MediaViewImagePanel_externalViewerButton_text(), new ImageView(EXTERNAL)); - externalViewerButton.setOnAction(actionEvent -> //fx ActionEvent + externalViewerButton.setOnAction(actionEvent + -> //fx ActionEvent /* * TODO: why is the name passed into the action constructor? it * means we duplicate this string all over the place -jm - */ - new ExternalViewerAction(Bundle.MediaViewImagePanel_externalViewerButton_text(), new FileNode(file)) + */ new ExternalViewerAction(Bundle.MediaViewImagePanel_externalViewerButton_text(), new FileNode(file)) .actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "")) //Swing ActionEvent ); @@ -171,11 +171,10 @@ public class MediaViewImagePanel extends JPanel implements DataContentViewerMedi } readImageTask = ImageUtils.newReadImageTask(file); readImageTask.setOnSucceeded(succeeded -> { - //Note that all error conditions are allready logged in readImageTask.succeeded() if (!Case.isCaseOpen()) { /* - * handle in-between condition when case is being closed and - * an image was previously selected + * Handle the in-between condition when case is being closed + * and an image was previously selected * * NOTE: I think this is unnecessary -jm */ @@ -200,7 +199,7 @@ public class MediaViewImagePanel extends JPanel implements DataContentViewerMedi readImageTask.setOnFailed(failed -> { if (!Case.isCaseOpen()) { /* - * handle in-between condition when case is being closed and + * Handle in-between condition when case is being closed and * an image was previously selected * * NOTE: I think this is unnecessary -jm diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/TableFilterNode.java b/Core/src/org/sleuthkit/autopsy/corecomponents/TableFilterNode.java index 9c04a003ff..92fc5ce13e 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/TableFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/TableFilterNode.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.corecomponents; import org.openide.nodes.FilterNode; import org.openide.nodes.Node; import org.openide.util.NbBundle; +import org.openide.util.lookup.Lookups; /** * A filter node that creates at most one layer of child nodes for the node it @@ -44,7 +45,7 @@ public class TableFilterNode extends FilterNode { * The constructor should include column order key. (See getColumnOrderKey) */ public TableFilterNode(Node wrappedNode, boolean createChildren) { - super(wrappedNode, TableFilterChildren.createInstance(wrappedNode, createChildren)); + super(wrappedNode, TableFilterChildren.createInstance(wrappedNode, createChildren) , Lookups.proxy(wrappedNode)); this.createChildren = createChildren; } diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java b/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java index b00f4cc513..02dc9fa112 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/UNCPathUtilities.java @@ -315,4 +315,29 @@ public class UNCPathUtilities { } return driveMap; } + + /** + * Converts a path to UNC, if possible. This is accomplished by checking the + * mapped drives list the operating system maintains and substituting where + * required. If the drive of the path passed in does not exist in the cached + * mapped drives list, a rescan of the mapped drives list is forced, and + * mapping is attempted one more time. + * + * @param indexDir the String of the absolute path to be converted to UNC, + * if possible + * + * @return UNC path if able to convert to UNC, original input path otherwise + */ + synchronized public String convertPathToUNC(String indexDir) { + // if we can check for UNC paths, do so, otherwise just return the indexDir + String result = mappedDriveToUNC(indexDir); + if (result == null) { + rescanDrives(); + result = mappedDriveToUNC(indexDir); + } + if (result == null) { + return indexDir; + } + return result; + } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java index 2b7f7078a9..7c28e09529 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.datamodel; import java.text.SimpleDateFormat; +import java.util.Arrays; import java.util.logging.Level; import org.apache.commons.lang.StringUtils; import org.openide.util.NbBundle; @@ -130,9 +131,11 @@ public class ArtifactStringContent implements StringContent { case INTEGER: case LONG: case DOUBLE: - case BYTE: buffer.append(attr.getDisplayString()); break; + case BYTE: + buffer.append(Arrays.toString(attr.getValueBytes())); + break; case DATETIME: long epoch = attr.getValueLong(); String time = "0000-00-00 00:00:00"; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 7d15bb2101..dc6f5ab2ab 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -404,7 +404,8 @@ public class BlackboardArtifactNode extends DisplayableItemNode { if (attributeTypeID == ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID() || attributeTypeID == ATTRIBUTE_TYPE.TSK_TAGGED_ARTIFACT.getTypeID() || attributeTypeID == ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID() - || attributeTypeID == ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) { + || attributeTypeID == ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID() + || attributeTypeID == ATTRIBUTE_TYPE.TSK_KEYWORD_SEARCH_TYPE.getTypeID()) { } else if (attribute.getAttributeType().getValueType() == BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME) { map.put(attribute.getAttributeType().getDisplayName(), ContentUtils.getStringTime(attribute.getValueLong(), associated)); } else if (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_TOOL_OUTPUT.getTypeID() @@ -452,13 +453,6 @@ public class BlackboardArtifactNode extends DisplayableItemNode { forLookup.add(content); } - // if there is a text highlighted version, of the content, add it too - // currently happens from keyword search module - TextMarkupLookup highlight = getHighlightLookup(artifact, content); - if (highlight != null) { - forLookup.add(highlight); - } - return Lookups.fixed(forLookup.toArray(new Object[forLookup.size()])); } @@ -472,39 +466,6 @@ public class BlackboardArtifactNode extends DisplayableItemNode { NbBundle.getMessage(BlackboardArtifactNode.class, "BlackboardArtifactNode.getAssocCont.exception.msg")); } - private static TextMarkupLookup getHighlightLookup(BlackboardArtifact artifact, Content content) { - if (artifact.getArtifactTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { - return null; - } - - long objectId = content.getId(); - - Lookup lookup = Lookup.getDefault(); - TextMarkupLookup highlightFactory = lookup.lookup(TextMarkupLookup.class); - try { - List attributes = artifact.getAttributes(); - String keyword = null; - String regexp = null; - for (BlackboardAttribute att : attributes) { - final int attributeTypeID = att.getAttributeType().getTypeID(); - if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { - keyword = att.getValueString(); - } else if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_REGEXP.getTypeID()) { - regexp = att.getValueString(); - } else if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) { - objectId = att.getValueLong(); - } - } - if (keyword != null) { - boolean isRegexp = StringUtils.isNotBlank(regexp); - String origQuery = isRegexp ? regexp : keyword; - return highlightFactory.createInstance(objectId, keyword, isRegexp, origQuery); - } - } catch (TskCoreException ex) { - LOGGER.log(Level.WARNING, "Failed to retrieve Blackboard Attributes", ex); //NON-NLS - } - return null; - } @Override public boolean isLeafTypeNode() { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/TextMarkupLookup.java b/Core/src/org/sleuthkit/autopsy/datamodel/TextMarkupLookup.java deleted file mode 100644 index a2eef74396..0000000000 --- a/Core/src/org/sleuthkit/autopsy/datamodel/TextMarkupLookup.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2011-2015 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.sleuthkit.autopsy.datamodel; - -/** - * This interface acts as a sort of bridge between the Autopsy Core NetBeans - * Module (NBM) and the Autopsy KeywordSearch NBM. It is used to get indexed - * text marked up with HTML to highlight search hits for a particular keyword. - * - * Here is an example of how it works. It is used to put highlighted markup into - * the Lookups of the BlackboardArtifactNodes for keyword search hit artifacts. - * The BlackboardArtifactNode code that populates the node's Lookup asks the - * default global Lookup for an instance of TextMarkupLookup. The - * org.sleuthkit.autopsy.keywordsearch.HighlightedText class is the sole - * implementation of the interface, so the BlackboardArtifactNode gets a default - * constructed instance of HighlightedText. This otherwise useless - * instance is then used to call createInstance with parameters that are used to - * employ the Solr highlighting capability to create the markup. The - * TextMarkupLookup object goes in the BlackboardArtifactNode Lookup for later - * use by the ExtractedContentViewer, a DataContentViewer in the KeywordSearch - * NBM. - */ -public interface TextMarkupLookup { - - /** - * Factory method for getting an object that encapsulates indexed text - * marked up (HTML) to highlight search hits for a particular keyword. - * - * @param objectId ID of the object (file or artifact) that is the - * source of the indexed text. - * @param keyword The keyword to be highlighted in the text. - * @param isRegex Whether or not the query that follows is a regex. - * @param originalQuery The query that produces the keyword hit. - * - * @return An object that encapsulates indexed text marked up (HTML) to - * highlight search hits for a particular keyword. - */ - public TextMarkupLookup createInstance(long objectId, String keyword, boolean isRegex, String originalQuery); -} diff --git a/Core/src/org/sleuthkit/autopsy/diagnostics/PerformancePanelAction.java b/Core/src/org/sleuthkit/autopsy/diagnostics/PerformancePanelAction.java index e1af3697a6..4c54f587e8 100755 --- a/Core/src/org/sleuthkit/autopsy/diagnostics/PerformancePanelAction.java +++ b/Core/src/org/sleuthkit/autopsy/diagnostics/PerformancePanelAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,23 +27,19 @@ import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; import org.sleuthkit.autopsy.casemodule.Case; -@ActionID( - category = "Help", - id = "org.sleuthkit.autopsy.diagnostics.PerformancePanelAction" -) -@ActionRegistration( - displayName = "#CTL_PerformancePanelAction", - lazy=true -) +@ActionID(category = "Help", id = "org.sleuthkit.autopsy.diagnostics.PerformancePanelAction") +@ActionRegistration(displayName = "#CTL_PerformancePanelAction", lazy = true) @ActionReference(path = "Menu/Help", position = 1437) public final class PerformancePanelAction extends CallableSystemAction { + private static final long serialVersionUID = 1L; + @Override public void performAction() { JDialog dialog = new PerformancePanel(); dialog.setVisible(true); } - + @Override public boolean isEnabled() { return Case.isCaseOpen(); @@ -56,8 +52,9 @@ public final class PerformancePanelAction extends CallableSystemAction { @Override public boolean asynchronous() { - return false; // run on edt + return false; } + @Override public String getName() { return NbBundle.getMessage(PerformancePanelAction.class, "CTL_PerformancePanelAction"); diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java index 4cbf5fa283..51b4bf7cb1 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java @@ -353,97 +353,101 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat // change the cursor to "waiting cursor" for this operation this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); try { - if (Case.isCaseOpen()) { - Case currentCase = Case.getCurrentCase(); + Case currentCase = null; + try { + currentCase = Case.getCurrentCase(); + } catch (IllegalStateException ex) { + /* + * No open case. + */ + } - // close the top component if there's no image in this case - if (currentCase.hasData() == false) { - //this.close(); - ((BeanTreeView) this.jScrollPane1).setRootVisible(false); // hide the root - } else { - // if there's at least one image, load the image and open the top component - List items = new ArrayList<>(); - final SleuthkitCase tskCase = currentCase.getSleuthkitCase(); - items.add(new DataSources()); - items.add(new Views(tskCase)); - items.add(new Results(tskCase)); - items.add(new Tags()); - items.add(new Reports()); - contentChildren = new RootContentChildren(items); + // close the top component if there's no image in this case + if (null == currentCase || currentCase.hasData() == false) { + ((TreeView) this.jScrollPane1).setRootVisible(false); // hide the root + } else { + // if there's at least one image, load the image and open the top component + List items = new ArrayList<>(); + final SleuthkitCase tskCase = currentCase.getSleuthkitCase(); + items.add(new DataSources()); + items.add(new Views(tskCase)); + items.add(new Results(tskCase)); + items.add(new Tags()); + items.add(new Reports()); + contentChildren = new RootContentChildren(items); - Node root = new AbstractNode(contentChildren) { - /** - * to override the right click action in the white blank - * space area on the directory tree window - */ - @Override - public Action[] getActions(boolean popup) { - return new Action[]{}; - } - - // Overide the AbstractNode use of DefaultHandle to return - // a handle which can be serialized without a parent - @Override - public Node.Handle getHandle() { - return new Node.Handle() { - @Override - public Node getNode() throws IOException { - return em.getRootContext(); - } - }; - } - }; - - root = new DirectoryTreeFilterNode(root, true); - - em.setRootContext(root); - em.getRootContext().setName(currentCase.getName()); - em.getRootContext().setDisplayName(currentCase.getName()); - ((BeanTreeView) this.jScrollPane1).setRootVisible(false); // hide the root - - // Reset the forward and back lists because we're resetting the root context - resetHistory(); - - Children childNodes = em.getRootContext().getChildren(); - TreeView tree = getTree(); - - Node results = childNodes.findChild(ResultsNode.NAME); - tree.expandNode(results); - - Children resultsChilds = results.getChildren(); - tree.expandNode(resultsChilds.findChild(KeywordHits.NAME)); - tree.expandNode(resultsChilds.findChild(ExtractedContent.NAME)); - - Accounts accounts = resultsChilds.findChild(Accounts.NAME).getLookup().lookup(Accounts.class); - showRejectedCheckBox.setAction(accounts.newToggleShowRejectedAction()); - showRejectedCheckBox.setSelected(false); - - Node views = childNodes.findChild(ViewsNode.NAME); - Children viewsChilds = views.getChildren(); - for (Node n : viewsChilds.getNodes()) { - tree.expandNode(n); + Node root = new AbstractNode(contentChildren) { + /** + * to override the right click action in the white blank + * space area on the directory tree window + */ + @Override + public Action[] getActions(boolean popup) { + return new Action[]{}; } - tree.collapseNode(views); - - // if the dataResult is not opened - if (!dataResult.isOpened()) { - dataResult.open(); // open the data result top component as well when the directory tree is opened + // Overide the AbstractNode use of DefaultHandle to return + // a handle which can be serialized without a parent + @Override + public Node.Handle getHandle() { + return new Node.Handle() { + @Override + public Node getNode() throws IOException { + return em.getRootContext(); + } + }; } + }; - // select the first image node, if there is one - // (this has to happen after dataResult is opened, because the event - // of changing the selected node fires a handler that tries to make - // dataResult active) - if (childNodes.getNodesCount() > 0) { - try { - em.setSelectedNodes(new Node[]{childNodes.getNodeAt(0)}); - } catch (Exception ex) { - LOGGER.log(Level.SEVERE, "Error setting default selected node.", ex); //NON-NLS - } - } + root = new DirectoryTreeFilterNode(root, true); + em.setRootContext(root); + em.getRootContext().setName(currentCase.getName()); + em.getRootContext().setDisplayName(currentCase.getName()); + ((TreeView) this.jScrollPane1).setRootVisible(false); // hide the root + + // Reset the forward and back lists because we're resetting the root context + resetHistory(); + + Children childNodes = em.getRootContext().getChildren(); + TreeView tree = getTree(); + + Node results = childNodes.findChild(ResultsNode.NAME); + tree.expandNode(results); + + Children resultsChilds = results.getChildren(); + tree.expandNode(resultsChilds.findChild(KeywordHits.NAME)); + tree.expandNode(resultsChilds.findChild(ExtractedContent.NAME)); + + Accounts accounts = resultsChilds.findChild(Accounts.NAME).getLookup().lookup(Accounts.class); + showRejectedCheckBox.setAction(accounts.newToggleShowRejectedAction()); + showRejectedCheckBox.setSelected(false); + + Node views = childNodes.findChild(ViewsNode.NAME); + Children viewsChilds = views.getChildren(); + for (Node n : viewsChilds.getNodes()) { + tree.expandNode(n); } + + tree.collapseNode(views); + + // if the dataResult is not opened + if (!dataResult.isOpened()) { + dataResult.open(); // open the data result top component as well when the directory tree is opened + } + + // select the first image node, if there is one + // (this has to happen after dataResult is opened, because the event + // of changing the selected node fires a handler that tries to make + // dataResult active) + if (childNodes.getNodesCount() > 0) { + try { + em.setSelectedNodes(new Node[]{childNodes.getNodeAt(0)}); + } catch (PropertyVetoException ex) { + LOGGER.log(Level.SEVERE, "Error setting default selected node.", ex); //NON-NLS + } + } + } } finally { this.setCursor(null); @@ -494,7 +498,12 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat @Override public boolean canClose() { - return !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; // only allow this window to be closed when there's no case opened or no image in this case + /* + * Only allow the main tree view in the left side of the main window to + * be closed if there is no opne case or the open case has no data + * sources. + */ + return !Case.isCaseOpen() || Case.getCurrentCase().hasData() == false; } /** @@ -540,7 +549,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat */ @Override public void propertyChange(PropertyChangeEvent evt) { - if (RuntimeProperties.coreComponentsAreActive()) { + if (RuntimeProperties.runningWithGUI()) { String changed = evt.getPropertyName(); if (changed.equals(Case.Events.CURRENT_CASE.toString())) { // changed current case // When a case is closed, the old value of this property is the diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java index 0c54e338eb..f7ae47cc73 100644 --- a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java +++ b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -94,7 +94,7 @@ class DateSearchFilter extends AbstractFileSearchFilter { } catch (ParseException ex) { // for now, no need to show the error message to the user here } - if (!startDateValue.equals("")) { + if (!startDateValue.isEmpty()) { if (startDate != null) { fromDate = startDate.getTimeInMillis() / 1000; // divided by 1000 because we want to get the seconds, not miliseconds } @@ -114,7 +114,7 @@ class DateSearchFilter extends AbstractFileSearchFilter { } catch (ParseException ex) { // for now, no need to show the error message to the user here } - if (!endDateValue.equals("")) { + if (!endDateValue.isEmpty()) { if (endDate != null) { toDate = endDate.getTimeInMillis() / 1000; // divided by 1000 because we want to get the seconds, not miliseconds } @@ -166,7 +166,7 @@ class DateSearchFilter extends AbstractFileSearchFilter { List timeZones = new ArrayList<>(); - if (Case.isCaseOpen()) { + try { // get the latest case Case currentCase = Case.getCurrentCase(); // get the most updated case @@ -195,6 +195,8 @@ class DateSearchFilter extends AbstractFileSearchFilter { String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id); //NON-NLS timeZones.add(item); } + } catch (IllegalStateException ex) { + // No current case. } return timeZones; @@ -207,7 +209,7 @@ class DateSearchFilter extends AbstractFileSearchFilter { @Override public boolean isValid() { - return this.getComponent().isValidSearch(); + return this.getComponent().isValidSearch(); } /** diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java index 70c8baeaa6..603d9d1623 100644 --- a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java +++ b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java @@ -1,15 +1,15 @@ /* * Autopsy Forensic Browser - * - * Copyright 2011 Basis Technology Corp. + * + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,14 +29,13 @@ import org.sleuthkit.autopsy.directorytree.FileSearchProvider; final class FileSearchAction extends CallableSystemAction implements FileSearchProvider { + private static final long serialVersionUID = 1L; private static FileSearchAction instance = null; FileSearchAction() { super(); - setEnabled(Case.isCaseOpen()); //no guarantee listener executed, so check here - + setEnabled(Case.isCaseOpen()); Case.addPropertyChangeListener(new PropertyChangeListener() { - @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) { diff --git a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/AutoIngestDataSourceProcessor.java b/Core/src/org/sleuthkit/autopsy/framework/AutoIngestDataSourceProcessor.java similarity index 92% rename from Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/AutoIngestDataSourceProcessor.java rename to Core/src/org/sleuthkit/autopsy/framework/AutoIngestDataSourceProcessor.java index f7d50235da..e4acab8234 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/AutoIngestDataSourceProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/framework/AutoIngestDataSourceProcessor.java @@ -16,9 +16,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponentinterfaces; +package org.sleuthkit.autopsy.framework; import java.nio.file.Path; +import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor; +import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; +import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor; /** * Interface implemented by DataSourceProcessors in order to be supported by diff --git a/Core/src/org/sleuthkit/autopsy/framework/AutopsyService.java b/Core/src/org/sleuthkit/autopsy/framework/AutopsyService.java new file mode 100644 index 0000000000..2869b550f3 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/AutopsyService.java @@ -0,0 +1,171 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2016 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.framework; + +import org.sleuthkit.autopsy.casemodule.Case; + +/** + * An interface for services that report status and may manage case and + * application resources such a text index, a database, etc. A service provider + * may have resources of both types, of only one type, or no resources at all. + */ +public interface AutopsyService { + + /** + * Gets the service name. + * + * @return The service name. + */ + String getServiceName(); + +// Status getStatus() { +// +// } +// default void openAppResources(ApplicationContext context) throws AutopsyServiceException { +// /* +// * Autopsy services may not have application-level resources. +// */ +// } + /** + * Creates, opens or upgrades any case-level resources managed by the + * service. + * + * @param context The case context which includes things such as the case, a + * progress indicator for the operation, a cancellation + * request flag, etc. + * @throws org.sleuthkit.autopsy.framework.AutopsyService.AutopsyServiceException + */ + default void openCaseResources(CaseContext context) throws AutopsyServiceException { + /* + * Autopsy services may not have case-level resources. + */ + } + + /** + * Closes any case-level resources managed by the service. + * + * @param context The case context which includes things such as the case, a + * progress indicator for the operation, a cancellation + * request flag, etc. + * @throws org.sleuthkit.autopsy.framework.AutopsyService.AutopsyServiceException + */ + default void closeCaseResources(CaseContext context) throws AutopsyServiceException { + /* + * Autopsy services may not have case-level resources. + */ + } + +// default void closeAppResources(ApplicationContext context) throws AutopsyServiceException { +// /* +// * Autopsy services may not have case-level resources. +// */ +// } + /** + * The context for the creation/opening/upgrading of case-level resources by + * a service. + */ + public static class CaseContext { + + private final Case theCase; + private final ProgressIndicator progressIndicator; + private volatile boolean cancelRequested; + + /** + * Constructs the context for the creation/opening/upgrading of + * case-level resources by a service. + * + * @param theCase The case. + * @param progressIndicator A progress indicator for the opening of the + * case-level resources + */ + public CaseContext(Case theCase, ProgressIndicator progressIndicator) { + this.theCase = theCase; + this.progressIndicator = progressIndicator; + this.cancelRequested = false; + } + + /** + * Gets the case for the creation/opening/upgrading of case-level + * resources by a service. + * + * @return The case. + */ + public Case getCase() { + return this.theCase; + } + + /** + * Gets the progress indicator for the creation/opening/upgrading of + * case-level resources by a service. + * + * @return The progress indicator. + */ + public ProgressIndicator getProgressIndicator() { + return this.progressIndicator; + } + + /** + * Requests cancellation of the creation/opening/upgrading of case-level + * resources by a service. The request is not guaranteed to be honored. + */ + public void requestCancel() { + this.cancelRequested = true; + } + + /** + * Indicates whether or not cancellation of the + * creation/opening/upgrading of case-level resources by a service has + * been requested. + * + * @return True or false. + */ + public boolean cancelRequested() { + return this.cancelRequested; + } + } + + /** + * Exception thrown by autopsy service methods. + */ + public static class AutopsyServiceException extends Exception { + + private static final long serialVersionUID = 1L; + + /** + * Constructs an exception to be thrown by an autopsy service provider + * method. + * + * @param message Exception message. + */ + public AutopsyServiceException(String message) { + super(message); + } + + /** + * Constructs an exception to be thrown by an autopsy service provider + * method. + * + * @param message Exception message. + * @param cause Exception cause. + */ + public AutopsyServiceException(String message, Throwable cause) { + super(message, cause); + } + } +} diff --git a/Core/src/org/sleuthkit/autopsy/framework/Bundle.properties b/Core/src/org/sleuthkit/autopsy/framework/Bundle.properties new file mode 100644 index 0000000000..7fcb87097c --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/Bundle.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +ProgressPanel.progressMessage.text=Message diff --git a/Core/src/org/sleuthkit/autopsy/framework/LoggingProgressIndicator.java b/Core/src/org/sleuthkit/autopsy/framework/LoggingProgressIndicator.java new file mode 100644 index 0000000000..3fcad59638 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/LoggingProgressIndicator.java @@ -0,0 +1,75 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.framework; + +import java.util.logging.Level; +import org.sleuthkit.autopsy.coreutils.Logger; + +/** + * A progress indicator that writes progress to the Autopsy application log. + */ +public final class LoggingProgressIndicator implements ProgressIndicator { + + private final Logger LOGGER = Logger.getLogger(LoggingProgressIndicator.class.getName()); + private int totalWorkUnits; + + @Override + public void start(String message, int totalWorkUnits) { + this.totalWorkUnits = totalWorkUnits; + LOGGER.log(Level.INFO, "{0} started, {1} total work units", new Object[]{message, this.totalWorkUnits}); + } + + @Override + public void start(String message) { + LOGGER.log(Level.INFO, "{0}", message); + } + + @Override + public void switchToIndeterminate(String message) { + this.totalWorkUnits = 0; + LOGGER.log(Level.INFO, "{0}", message); + } + + @Override + public void switchToDeterminate(String message, int workUnitsCompleted, int totalWorkUnits) { + this.totalWorkUnits = totalWorkUnits; + LOGGER.log(Level.INFO, "{0}, {1} of {2} total work units completed", new Object[]{message, workUnitsCompleted, this.totalWorkUnits}); + } + + @Override + public void progress(String message) { + LOGGER.log(Level.INFO, "{0}", message); + } + + @Override + public void progress(int workUnitsCompleted) { + LOGGER.log(Level.INFO, "{1} of {2} total work units completed", new Object[]{workUnitsCompleted, this.totalWorkUnits}); + } + + @Override + public void progress(String message, int workUnitsCompleted) { + LOGGER.log(Level.INFO, "{0}, {1} of {2} total work units completed", new Object[]{message, workUnitsCompleted, this.totalWorkUnits}); + } + + @Override + public void finish(String message) { + LOGGER.log(Level.INFO, "{0} finished", message); + } + +} diff --git a/Core/src/org/sleuthkit/autopsy/framework/ModalDialogProgressIndicator.java b/Core/src/org/sleuthkit/autopsy/framework/ModalDialogProgressIndicator.java new file mode 100644 index 0000000000..c5df4c8cfa --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/ModalDialogProgressIndicator.java @@ -0,0 +1,247 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.framework; + +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.event.ActionListener; +import javax.swing.JDialog; +import javax.swing.SwingUtilities; +import org.openide.DialogDescriptor; +import org.openide.DialogDisplayer; +import org.openide.util.HelpCtx; + +/** + * A progress indicator that displays progress using a modal dialog with a + * message label, a progress bar, and optionally, a configurable set of buttons + * with a button listener. + */ +public final class ModalDialogProgressIndicator implements ProgressIndicator { + + private final Frame parent; + private final ProgressPanel progressPanel; + private final Dialog dialog; + private final ActionListener buttonListener; + + /** + * Creates a progress indicator that displays progress using a modal dialog + * with a message label, a progress bar with a configurable set of buttons + * with a button listener. + * + * @param parent The parent frame. + * @param title The title for the dialog. + * @param buttonLabels The labels for the desired buttons. + * @param focusedButtonLabel The label of the button that should have + * initial focus. + * @param buttonListener An ActionListener for the buttons. + */ + public ModalDialogProgressIndicator(Frame parent, String title, Object[] buttonLabels, Object focusedButtonLabel, ActionListener buttonListener) { + this.parent = parent; + progressPanel = new ProgressPanel(); + DialogDescriptor dialogDescriptor = new DialogDescriptor( + progressPanel, + title, + true, + buttonLabels, + focusedButtonLabel, + DialogDescriptor.BOTTOM_ALIGN, + HelpCtx.DEFAULT_HELP, + buttonListener); + dialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor); + this.buttonListener = buttonListener; + } + + /** + * Creates a progress indicator that displays progress using a modal dialog + * with a message label and a progress bar with no buttons. + * + * @param parent The parent frame. + * @param title The title for the dialog. + */ + public ModalDialogProgressIndicator(Frame parent, String title) { + this.parent = parent; + progressPanel = new ProgressPanel(); + dialog = new JDialog(parent, title, true); + dialog.add(progressPanel); + dialog.pack(); + buttonListener = null; + } + + /** + * Calls setVisible on the underlying modal dialog. + * + * @param isVisible True or false. + */ + public void setVisible(boolean isVisible) { + if (isVisible) { + dialog.setLocationRelativeTo(parent); + } + this.dialog.setVisible(isVisible); + } + + /** + * Gets the button listener for the dialog, if there is one. + * + * @return The button listener or null. + */ + public ActionListener getButtonListener() { + return buttonListener; + } + + /** + * Starts the progress indicator in determinate mode (the total number of + * work units to be completed is known). + * + * @param message The initial progress message. + * @param totalWorkUnits The total number of work units. + */ + @Override + public void start(String message, int totalWorkUnits) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setInderminate(false); + progressPanel.setMessage(message); + progressPanel.setMaximum(totalWorkUnits); + } + }); + } + + /** + * Starts the progress indicator in indeterminate mode (the total number of + * work units to be completed is unknown). + * + * @param message The initial progress message. + */ + @Override + public void start(String message) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setInderminate(true); + progressPanel.setMessage(message); + } + }); + } + + /** + * Switches the progress indicator to indeterminate mode (the total number + * of work units to be completed is unknown). + * + * @param message The initial progress message. + */ + @Override + public void switchToIndeterminate(String message) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setInderminate(true); + progressPanel.setMessage(message); + } + }); + } + + /** + * Switches the progress indicator to determinate mode (the total number of + * work units to be completed is known). + * + * @param message The initial progress message. + * @param workUnitsCompleted The number of work units completed so far. + * @param totalWorkUnits The total number of work units to be completed. + */ + @Override + public void switchToDeterminate(String message, int workUnitsCompleted, int totalWorkUnits) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setInderminate(false); + progressPanel.setMessage(message); + progressPanel.setMaximum(totalWorkUnits); + progressPanel.setCurrent(workUnitsCompleted); + } + }); + } + + /** + * Updates the progress indicator with a progress message. + * + * @param message The progress message. + */ + @Override + public void progress(String message) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setMessage(message); + } + }); + } + + /** + * Updates the progress indicator with the number of work units completed so + * far when in determinate mode (the total number of work units to be + * completed is known). + * + * @param workUnitsCompleted Number of work units completed so far. + */ + @Override + public void progress(int workUnitsCompleted) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setCurrent(workUnitsCompleted); + } + }); + } + + /** + * Updates the progress indicator with a progress message and the number of + * work units completed so far when in determinate mode (the total number of + * work units to be completed is known). + * + * @param message The progress message. + * @param workUnitsCompleted Number of work units completed so far. + */ + @Override + public void progress(String message, int workUnitsCompleted) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setMessage(message); + progressPanel.setCurrent(workUnitsCompleted); + } + }); + } + + /** + * Finishes the progress indicator when the task is completed. + * + * @param message The finished message. + */ + @Override + public void finish(String message) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progressPanel.setMessage(message); + } + }); + } + +} diff --git a/Core/src/org/sleuthkit/autopsy/framework/ProgressIndicator.java b/Core/src/org/sleuthkit/autopsy/framework/ProgressIndicator.java new file mode 100644 index 0000000000..0f51d98d75 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/ProgressIndicator.java @@ -0,0 +1,96 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.framework; + +/** + * An interface for progress indicators. A progress indicator can run in + * determinate mode (the total number of work units to be completed is known) or + * indeterminate mode. Switching back and forth between the two modes is + * supported. Starting, finishing, and starting again is supported. + */ +public interface ProgressIndicator { + + /** + * Starts the progress indicator in determinate mode (the total number of + * work units to be completed is known). + * + * @param message The initial progress message. + * @param totalWorkUnits The total number of work units. + */ + void start(String message, int totalWorkUnits); + + /** + * Starts the progress indicator in indeterminate mode (the total number of + * work units to be completed is unknown). + * + * @param message The initial progress message. + */ + void start(String message); + + /** + * Switches the progress indicator to indeterminate mode (the total number + * of work units to be completed is unknown). + * @param message The initial progress message. + */ + public void switchToIndeterminate(String message); + + /** + * Switches the progress indicator to determinate mode (the total number of + * work units to be completed is known). + * + * @param message The initial progress message. + * @param workUnitsCompleted The number of work units completed so far. + * @param totalWorkUnits The total number of work units to be completed. + */ + public void switchToDeterminate(String message, int workUnitsCompleted, int totalWorkUnits); + + /** + * Updates the progress indicator with a progress message. + * + * @param message The progress message. + */ + public void progress(String message); + + /** + * Updates the progress indicator with the number of work units completed so + * far when in determinate mode (the total number of work units to be + * completed is known). + * + * @param workUnitsCompleted Number of work units completed so far. + */ + public void progress(int workUnitsCompleted); + + /** + * Updates the progress indicator with a progress message and the number of + * work units completed so far when in determinate mode (the total number of + * work units to be completed is known). + * + * @param message The progress message. + * @param workUnitsCompleted Number of work units completed so far. + */ + public void progress(String message, int workUnitsCompleted); + + /** + * Finishes the progress indicator when the task is completed. + * + * @param message The finished message. + */ + void finish(String message); + +} diff --git a/Core/src/org/sleuthkit/autopsy/framework/ProgressPanel.form b/Core/src/org/sleuthkit/autopsy/framework/ProgressPanel.form new file mode 100644 index 0000000000..59678117af --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/ProgressPanel.form @@ -0,0 +1,52 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Core/src/org/sleuthkit/autopsy/framework/ProgressPanel.java b/Core/src/org/sleuthkit/autopsy/framework/ProgressPanel.java new file mode 100644 index 0000000000..6d4e46cc42 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/ProgressPanel.java @@ -0,0 +1,90 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.framework; + +/** + * A progress panel consisting of a message label and a progress bar. + */ +class ProgressPanel extends javax.swing.JPanel { + + private static final long serialVersionUID = 1L; + + ProgressPanel() { + initComponents(); + this.progressBar.setMinimum(0); + } + + void setMessage(String message) { + this.progressMessage.setText(message); + } + + void setInderminate(boolean indeterminate) { + this.progressBar.setIndeterminate(indeterminate); + } + + void setMaximum(int max) { + this.progressBar.setMaximum(max); + } + + void setCurrent(int current) { + this.progressBar.setValue(current); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + progressMessage = new javax.swing.JLabel(); + progressBar = new javax.swing.JProgressBar(); + + org.openide.awt.Mnemonics.setLocalizedText(progressMessage, org.openide.util.NbBundle.getMessage(ProgressPanel.class, "ProgressPanel.progressMessage.text")); // NOI18N + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(22, 22, 22) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(progressMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE)) + .addContainerGap(23, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(24, 24, 24) + .addComponent(progressMessage) + .addGap(18, 18, 18) + .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(33, Short.MAX_VALUE)) + ); + }// //GEN-END:initComponents + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JProgressBar progressBar; + private javax.swing.JLabel progressMessage; + // End of variables declaration//GEN-END:variables +} diff --git a/Core/src/org/sleuthkit/autopsy/framework/SilentProgressIndicator.java b/Core/src/org/sleuthkit/autopsy/framework/SilentProgressIndicator.java new file mode 100644 index 0000000000..8152a097c9 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/framework/SilentProgressIndicator.java @@ -0,0 +1,60 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.framework; + +import org.sleuthkit.autopsy.framework.ProgressIndicator; + +/** + * A "silent" or "null" progress indicator. + */ +public class SilentProgressIndicator implements ProgressIndicator { + + @Override + public void start(String message, int totalWorkUnits) { + } + + @Override + public void start(String message) { + } + + @Override + public void switchToIndeterminate(String message) { + } + + @Override + public void switchToDeterminate(String message, int workUnitsCompleted, int totalWorkUnits) { + } + + @Override + public void progress(String message) { + } + + @Override + public void progress(int workUnitsCompleted) { + } + + @Override + public void progress(String message, int workUnitsCompleted) { + } + + @Override + public void finish(String message) { + } + +} diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index e1b2ae9163..1301f7d3c4 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2013-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -330,11 +330,11 @@ public class IngestManager { // check whether a multi-user case is currently being processed try { - if (!Case.isCaseOpen() || Case.getCurrentCase().getCaseType() != Case.CaseType.MULTI_USER_CASE) { + if (Case.getCurrentCase().getCaseType() != Case.CaseType.MULTI_USER_CASE) { return; } } catch (IllegalStateException ignore) { - // thorown by Case.getCurrentCase() when no case is open + // Thrown by Case.getCurrentCase() when no case is open return; } @@ -343,7 +343,7 @@ public class IngestManager { logger.log(Level.SEVERE, "Service {0} is down! Cancelling all running ingest jobs", serviceDisplayName); //NON-NLS // display notification if running interactively - if (isIngestRunning() && RuntimeProperties.coreComponentsAreActive()) { + if (isIngestRunning() && RuntimeProperties.runningWithGUI()) { EventQueue.invokeLater(new Runnable() { @Override public void run() { @@ -379,7 +379,7 @@ public class IngestManager { * Case.getTextIndexName() API. */ Case openedCase = Case.getCurrentCase(); - String channelPrefix = openedCase.getTextIndexName(); + String channelPrefix = openedCase.getName(); if (Case.CaseType.MULTI_USER_CASE == openedCase.getCaseType()) { jobEventPublisher.openRemoteEventChannel(String.format(JOB_EVENT_CHANNEL_NAME, channelPrefix)); moduleEventPublisher.openRemoteEventChannel(String.format(MODULE_EVENT_CHANNEL_NAME, channelPrefix)); @@ -392,24 +392,17 @@ public class IngestManager { } synchronized void handleCaseClosed() { + /* + * TODO (JIRA-2227): IngestManager should wait for cancelled ingest jobs + * to complete when a case is closed. + */ + this.cancelAllIngestJobs(IngestJob.CancellationReason.CASE_CLOSED); jobEventPublisher.closeRemoteEventChannel(); moduleEventPublisher.closeRemoteEventChannel(); this.jobCreationIsEnabled = false; clearIngestMessageBox(); } - /** - * Deprecated, use RuntimeProperties.setCoreComponentsActive instead. - * - * @param runInteractively True or false - * - * @deprecated - */ - @Deprecated - public synchronized void setRunInteractively(boolean runInteractively) { - RuntimeProperties.setCoreComponentsActive(runInteractively); - } - /** * Called by the custom installer for this package once the window system is * initialized, allowing the ingest manager to get the top component used to @@ -428,7 +421,7 @@ public class IngestManager { */ void postIngestMessage(IngestMessage message) { synchronized (this.ingestMessageBoxLock) { - if (ingestMessageBox != null && RuntimeProperties.coreComponentsAreActive()) { + if (ingestMessageBox != null && RuntimeProperties.runningWithGUI()) { if (message.getMessageType() != IngestMessage.MessageType.ERROR && message.getMessageType() != IngestMessage.MessageType.WARNING) { ingestMessageBox.displayMessage(message); } else { @@ -475,7 +468,7 @@ public class IngestManager { */ public void queueIngestJob(Collection dataSources, IngestJobSettings settings) { if (jobCreationIsEnabled) { - IngestJob job = new IngestJob(dataSources, settings, RuntimeProperties.coreComponentsAreActive()); + IngestJob job = new IngestJob(dataSources, settings, RuntimeProperties.runningWithGUI()); if (job.hasIngestPipeline()) { long taskId = nextThreadId.incrementAndGet(); Future task = startIngestJobsThreadPool.submit(new StartIngestJobTask(taskId, job)); @@ -485,9 +478,9 @@ public class IngestManager { } /** - * Starts an ingest job that will process a collection of data sources. - * This is intended to be used in an auto-ingest context and will fail - * if no ingest modules are enabled. + * Starts an ingest job that will process a collection of data sources. This + * is intended to be used in an auto-ingest context and will fail if no + * ingest modules are enabled. * * @param dataSources The data sources to process. * @param settings The settings for the ingest job. @@ -497,7 +490,7 @@ public class IngestManager { */ public synchronized IngestJobStartResult beginIngestJob(Collection dataSources, IngestJobSettings settings) { if (this.jobCreationIsEnabled) { - IngestJob job = new IngestJob(dataSources, settings, RuntimeProperties.coreComponentsAreActive()); + IngestJob job = new IngestJob(dataSources, settings, RuntimeProperties.runningWithGUI()); if (job.hasIngestPipeline()) { return this.startIngestJob(job); // Start job } @@ -543,7 +536,7 @@ public class IngestManager { try { if (!servicesMonitor.getServiceStatus(ServicesMonitor.Service.REMOTE_CASE_DATABASE.toString()).equals(ServicesMonitor.ServiceStatus.UP.toString())) { // display notification if running interactively - if (RuntimeProperties.coreComponentsAreActive()) { + if (RuntimeProperties.runningWithGUI()) { EventQueue.invokeLater(new Runnable() { @Override public void run() { @@ -582,7 +575,7 @@ public class IngestManager { logger.log(Level.SEVERE, String.format("Error starting %s ingest module for job %d", error.getModuleDisplayName(), job.getId()), error.getThrowable()); //NON-NLS } IngestManager.logger.log(Level.SEVERE, "Ingest job {0} could not be started", job.getId()); //NON-NLS - if (RuntimeProperties.coreComponentsAreActive()) { + if (RuntimeProperties.runningWithGUI()) { final StringBuilder message = new StringBuilder(); message.append(Bundle.IngestManager_startupErr_dlgMsg()).append("\n"); message.append(Bundle.IngestManager_startupErr_dlgSolution()).append("\n\n"); @@ -966,7 +959,7 @@ public class IngestManager { return null; } - if (RuntimeProperties.coreComponentsAreActive()) { + if (RuntimeProperties.runningWithGUI()) { final String displayName = NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.displayName"); this.progress = ProgressHandle.createHandle(displayName, new Cancellable() { @Override diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java index fac3307653..20b791c64d 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java @@ -130,7 +130,7 @@ class IngestMessagesToolbar extends javax.swing.JPanel { Case.addPropertyChangeListener((PropertyChangeEvent evt) -> { if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) { - setEnabled(evt.getNewValue() != null && RuntimeProperties.coreComponentsAreActive()); + setEnabled(evt.getNewValue() != null && RuntimeProperties.runningWithGUI()); } }); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form index d9d1e54aeb..6ced55aa7e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form @@ -27,7 +27,7 @@ - + @@ -45,42 +45,56 @@ - - - - - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + - - + @@ -90,19 +104,17 @@ - - - - - + + + + + - - - - - + + + - + @@ -257,15 +269,18 @@ + + + + + + - - - - - + + diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java index 1db29f0b5f..c057f08477 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java @@ -38,7 +38,6 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op "ProfileSettingsPanel.profileListLabel.text=Profiles:", "ProfileSettingsPanel.profileDescLabel.text=Profile Description:", "ProfileSettingsPanel.filterNameLabel.text=Filter:", - "ProfileSettingsPanel.filterDescLabel.text=Filter Description:", "ProfileSettingsPanel.selectedModulesLabel.text=Selected Ingest Modules:", "ProfileSettingsPanel.newProfileButton.text=New Profile", "ProfileSettingsPanel.editProfileButton.text=Edit Profile", @@ -85,7 +84,6 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op profileDescLabel = new javax.swing.JLabel(); filterNameLabel = new javax.swing.JLabel(); filterNameText = new javax.swing.JLabel(); - filterDescLabel = new javax.swing.JLabel(); filterDescPane = new javax.swing.JScrollPane(); filterDescArea = new javax.swing.JTextArea(); selectedModulesPane = new javax.swing.JScrollPane(); @@ -148,8 +146,11 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op org.openide.awt.Mnemonics.setLocalizedText(profileDescLabel, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.profileDescLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(filterNameLabel, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.filterNameLabel.text")); // NOI18N + filterNameLabel.setMinimumSize(new java.awt.Dimension(30, 14)); + filterNameLabel.setPreferredSize(new java.awt.Dimension(30, 14)); - org.openide.awt.Mnemonics.setLocalizedText(filterDescLabel, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.filterDescLabel.text")); // NOI18N + filterNameText.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + filterNameText.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); filterDescArea.setEditable(false); filterDescArea.setBackground(new java.awt.Color(240, 240, 240)); @@ -193,28 +194,37 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op .addComponent(deleteProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(6, 6, 6))) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(filterNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(filterNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(filterDescLabel) - .addComponent(selectedModulesLabel) - .addComponent(profileDescLabel)) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGap(8, 8, 8) + .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(ingestWarningLabel) - .addGap(0, 0, Short.MAX_VALUE)) - .addComponent(filterDescPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 413, Short.MAX_VALUE) - .addComponent(profileDescPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 413, Short.MAX_VALUE) - .addComponent(selectedModulesPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 413, Short.MAX_VALUE)))) - .addGap(12, 12, 12)) + .addComponent(profileDescLabel) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(8, 8, 8) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(ingestWarningLabel) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(profileDescPane, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(selectedModulesPane, javax.swing.GroupLayout.Alignment.TRAILING))) + .addGroup(layout.createSequentialGroup() + .addGap(10, 10, 10) + .addComponent(filterDescPane))) + .addContainerGap()))) + .addGroup(layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(filterNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, 0) + .addComponent(filterNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(selectedModulesLabel) + .addContainerGap()))) ); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deleteProfileButton, editProfileButton, newProfileButton}); @@ -231,16 +241,14 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() - .addComponent(profileDescPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(profileDescPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(filterNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(filterNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(filterNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(filterNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(filterDescLabel) + .addComponent(filterDescPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(filterDescPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) - .addGap(18, 18, 18) .addComponent(selectedModulesLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(selectedModulesPane)) @@ -428,7 +436,6 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op private javax.swing.JButton deleteProfileButton; private javax.swing.JButton editProfileButton; private javax.swing.JTextArea filterDescArea; - private javax.swing.JLabel filterDescLabel; private javax.swing.JScrollPane filterDescPane; private javax.swing.JLabel filterNameLabel; private javax.swing.JLabel filterNameText; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestAction.java b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestAction.java index ebb1f8db90..49875a3997 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestAction.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,14 +30,13 @@ import org.openide.util.actions.CallableSystemAction; import org.openide.util.actions.Presenter; import org.sleuthkit.autopsy.casemodule.Case; -@ActionID( - category = "Tools", - id = "org.sleuthkit.autopsy.ingest.RunIngestAction" -) -@ActionRegistration( - displayName = "#CTL_RunIngestAction", - lazy = false -) +/** + * The action associated with assorted Run Ingest Modules menu items. + * + * This action should only be invoked in the event dispatch thread (EDT). + */ +@ActionID(category = "Tools", id = "org.sleuthkit.autopsy.ingest.RunIngestAction") +@ActionRegistration(displayName = "#CTL_RunIngestAction", lazy = false) @Messages("CTL_RunIngestAction=Run Ingest") public final class RunIngestAction extends CallableSystemAction implements Presenter.Menu, ActionListener { @@ -51,6 +50,9 @@ public final class RunIngestAction extends CallableSystemAction implements Prese return action; } + private RunIngestAction() { + } + @Override public void performAction() { getMenuPresenter(); @@ -80,6 +82,6 @@ public final class RunIngestAction extends CallableSystemAction implements Prese @Override public boolean isEnabled() { - return Case.isCaseOpen();// && Case.getCurrentCase().hasData(); + return Case.isCaseOpen() && Case.getCurrentCase().hasData(); } } diff --git a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java index af43facec9..412d23251b 100644 --- a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java +++ b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,32 +23,39 @@ import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.TskCoreException; /** - * An implementation of a keyword search service. - * + * An interface for implementations of a keyword search service. + * * TODO (AUT-2158: This interface should not extend Closeable. */ public interface KeywordSearchService extends Closeable { /** - * Takes a Blackboard artifact and adds all of its attributes to the keyword - * search index. + * Tries to connect to the keyword search service server. * - * @param artifact + * @param host The hostname or IP address of the service. + * @param port The port used by the service. + * + * @throws KeywordSearchServiceException if cannot connect. + */ + public void tryConnect(String host, int port) throws KeywordSearchServiceException; + + /** + * Adds an artifact to the keyword search text index as a concatenation of + * all of its attributes. + * + * @param artifact The artifact to index. * * @throws org.sleuthkit.datamodel.TskCoreException */ public void indexArtifact(BlackboardArtifact artifact) throws TskCoreException; /** - * Checks if we can communicate with the KeywordSearchService using the - * passed-in host and port. Closes the connection upon exit. Throws if it - * cannot communicate. + * Deletes the keyword search text index for a case. * - * @param host the remote hostname or IP address of the server - * @param port the remote port of the server - * - * @throws KeywordSearchServiceException + * @param textIndexName The text index name. + * + * @throws KeywordSearchServiceException if unable to delete. */ - public void tryConnect(String host, int port) throws KeywordSearchServiceException; + public void deleteTextIndex(String textIndexName) throws KeywordSearchServiceException; } diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java index 8e97875930..40ae79064c 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java @@ -50,10 +50,11 @@ class DataContentDynamicMenu extends JMenuItem implements DynamicMenuContent { defaultItem.addActionListener(new OpenTopComponentAction(contentWin)); - if (!Case.isCaseOpen() || Case.getCurrentCase().hasData() == false) { - defaultItem.setEnabled(false); // disable the menu items when no case is opened - } else { - defaultItem.setEnabled(true); // enable the menu items when there's a case opened / created + try { + Case currentCase = Case.getCurrentCase(); + defaultItem.setEnabled(currentCase.hasData()); + } catch (IllegalStateException ex) { + defaultItem.setEnabled(false); // disable the menu when no case is opened } comps[counter++] = defaultItem; diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java index 11afe7cf03..16776ecdf4 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java @@ -53,10 +53,11 @@ class DataExplorerDynamicMenu extends JMenuItem implements DynamicMenuContent { JMenuItem item = new JMenuItem(explorerWin.getName()); item.addActionListener(new OpenTopComponentAction(explorerWin)); - if (!Case.isCaseOpen() || Case.getCurrentCase().hasData() == false) { + try { + Case currentCase = Case.getCurrentCase(); + item.setEnabled(currentCase.hasData()); + } catch (IllegalStateException ex) { item.setEnabled(false); // disable the menu when no case is opened - } else { - item.setEnabled(true); // enable the menu if the case is opened or created } comps[i++] = item; diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbManager.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbManager.java index aea5ae1ce2..01af5addc1 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbManager.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbManager.java @@ -492,7 +492,7 @@ public class HashDbManager implements PropertyChangeListener { the database from HashLookupSettings and the user may not know about this because the dialogs are not being displayed. The next time user starts Autopsy, HashDB will load without errors and the user may think that the problem was solved.*/ - if (!allDatabasesLoadedCorrectly && RuntimeProperties.coreComponentsAreActive()) { + if (!allDatabasesLoadedCorrectly && RuntimeProperties.runningWithGUI()) { try { HashLookupSettings.writeSettings(new HashLookupSettings(this.knownHashSets, this.knownBadHashSets)); allDatabasesLoadedCorrectly = true; @@ -512,7 +512,7 @@ public class HashDbManager implements PropertyChangeListener { // Give the user an opportunity to find the desired file. String newPath = null; - if (RuntimeProperties.coreComponentsAreActive() && + if (RuntimeProperties.runningWithGUI() && JOptionPane.showConfirmDialog(null, NbBundle.getMessage(this.getClass(), "HashDbManager.dlgMsg.dbNotFoundAtLoc", hashSetName, configuredPath), diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbPanelSearchAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbPanelSearchAction.java index b490099b57..d7471df562 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbPanelSearchAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbPanelSearchAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -36,13 +36,13 @@ import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationCleanDialog; */ class HashDbPanelSearchAction extends CallableSystemAction { + private static final long serialVersionUID = 1L; static final String ACTION_NAME = NbBundle.getMessage(HashDbPanelSearchAction.class, "HashDbPanelSearchAction.actionName"); private static HashDbPanelSearchAction instance = null; HashDbPanelSearchAction() { super(); - setEnabled(Case.isCaseOpen()); //no guarantee listener executed, so check here - + setEnabled(Case.isCaseOpen()); Case.addPropertyChangeListener(new PropertyChangeListener() { @Override diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettings.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettings.java index ae52f86219..9adc3a4df0 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettings.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettings.java @@ -203,7 +203,7 @@ final class HashLookupSettings implements Serializable { newHashSetName = hashSetName + suffix; } while (hashSetNames.contains(newHashSetName)); logger.log(Level.INFO, "Duplicate hash set name " + hashSetName + " found. Replacing with " + newHashSetName + "."); - if (RuntimeProperties.coreComponentsAreActive()) { + if (RuntimeProperties.runningWithGUI()) { JOptionPane.showMessageDialog(null, NbBundle.getMessage(HashLookupSettings.class, "HashDbManager.replacingDuplicateHashsetNameMsg", @@ -269,7 +269,7 @@ final class HashLookupSettings implements Serializable { try { FileUtils.copyFile(new File(configFilePath), new File(backupFilePath)); logger.log(Level.INFO, "Updated the schema, backup saved at: " + backupFilePath); - if (RuntimeProperties.coreComponentsAreActive()) { + if (RuntimeProperties.runningWithGUI()) { JOptionPane.showMessageDialog(null, NbBundle.getMessage(HashLookupSettings.class, "HashDbManager.savedBackupOfOldConfigMsg", diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java b/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java index c3aba3434f..c1cffc9243 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java @@ -301,7 +301,7 @@ class ReportExcel implements TableReportModule { row = sheet.createRow(rowIndex); row.setRowStyle(setStyle); row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.caseName")); - row.createCell(1).setCellValue(currentCase.getName()); + row.createCell(1).setCellValue(currentCase.getDisplayName()); ++rowIndex; row = sheet.createRow(rowIndex); diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java index 6f32fd2f65..afad0d5746 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java @@ -93,7 +93,7 @@ class ReportGenerator { DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss"); Date date = new Date(); String dateNoTime = dateFormat.format(date); - this.reportPath = currentCase.getReportDirectory() + File.separator + currentCase.getName() + " " + dateNoTime + File.separator; + this.reportPath = currentCase.getReportDirectory() + File.separator + currentCase.getDisplayName() + " " + dateNoTime + File.separator; this.errorList = new ArrayList<>(); diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index 3a7da57e3f..4b643e2a02 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -857,7 +857,7 @@ class ReportHTML implements TableReportModule { iconPath = "favicon.ico"; } index.append("\n").append(reportTitle).append(" ").append( - NbBundle.getMessage(this.getClass(), "ReportHTML.writeIndex.title", currentCase.getName())).append( + NbBundle.getMessage(this.getClass(), "ReportHTML.writeIndex.title", currentCase.getDisplayName())).append( "\n"); //NON-NLS index.append("\n"); //NON-NLS @@ -1017,7 +1017,7 @@ class ReportHTML implements TableReportModule { Date date = new Date(); String datetime = datetimeFormat.format(date); - String caseName = currentCase.getName(); + String caseName = currentCase.getDisplayName(); String caseNumber = currentCase.getNumber(); String examiner = currentCase.getExaminer(); int imagecount; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportWizardAction.java b/Core/src/org/sleuthkit/autopsy/report/ReportWizardAction.java index 5e32ce5016..75c8f7c205 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportWizardAction.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportWizardAction.java @@ -84,7 +84,7 @@ public final class ReportWizardAction extends CallableSystemAction implements Pr Case.addPropertyChangeListener((PropertyChangeEvent evt) -> { if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) { Case newCase = (Case) evt.getNewValue(); - setEnabled(newCase != null && RuntimeProperties.coreComponentsAreActive()); + setEnabled(newCase != null && RuntimeProperties.runningWithGUI()); } }); diff --git a/Core/src/org/sleuthkit/autopsy/report/taggedhashes/AddTaggedHashesToHashDb.java b/Core/src/org/sleuthkit/autopsy/report/taggedhashes/AddTaggedHashesToHashDb.java index 3348fdcafd..1de1db7eaa 100755 --- a/Core/src/org/sleuthkit/autopsy/report/taggedhashes/AddTaggedHashesToHashDb.java +++ b/Core/src/org/sleuthkit/autopsy/report/taggedhashes/AddTaggedHashesToHashDb.java @@ -90,7 +90,7 @@ public class AddTaggedHashesToHashDb implements GeneralReportModule { if (content instanceof AbstractFile) { if (null != ((AbstractFile) content).getMd5Hash()) { try { - hashSet.addHashes(tag.getContent(), Case.getCurrentCase().getName()); + hashSet.addHashes(tag.getContent(), Case.getCurrentCase().getDisplayName()); } catch (TskCoreException ex) { Logger.getLogger(AddTaggedHashesToHashDb.class.getName()).log(Level.SEVERE, "Error adding hash for obj_id = " + tag.getContent().getId() + " to hash database " + hashSet.getHashSetName(), ex); failedExports.add(tag.getContent().getName()); diff --git a/Core/src/org/sleuthkit/autopsy/report/testfixtures/CustomArtifactsCreatorIngestModule.java b/Core/src/org/sleuthkit/autopsy/test/CustomArtifactsCreatorIngestModule.java similarity index 99% rename from Core/src/org/sleuthkit/autopsy/report/testfixtures/CustomArtifactsCreatorIngestModule.java rename to Core/src/org/sleuthkit/autopsy/test/CustomArtifactsCreatorIngestModule.java index 289623f0ef..dcfe57c206 100644 --- a/Core/src/org/sleuthkit/autopsy/report/testfixtures/CustomArtifactsCreatorIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/test/CustomArtifactsCreatorIngestModule.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.report.testfixtures; +package org.sleuthkit.autopsy.test; import java.util.ArrayList; import java.util.List; diff --git a/Core/src/org/sleuthkit/autopsy/report/testfixtures/CustomArtifactsCreatorIngestModuleFactory.java b/Core/src/org/sleuthkit/autopsy/test/CustomArtifactsCreatorIngestModuleFactory.java similarity index 97% rename from Core/src/org/sleuthkit/autopsy/report/testfixtures/CustomArtifactsCreatorIngestModuleFactory.java rename to Core/src/org/sleuthkit/autopsy/test/CustomArtifactsCreatorIngestModuleFactory.java index 29dca4fd27..8be2ef65f6 100644 --- a/Core/src/org/sleuthkit/autopsy/report/testfixtures/CustomArtifactsCreatorIngestModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/test/CustomArtifactsCreatorIngestModuleFactory.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.report.testfixtures; +package org.sleuthkit.autopsy.test; import org.sleuthkit.autopsy.coreutils.Version; import org.sleuthkit.autopsy.ingest.FileIngestModule; diff --git a/Core/src/org/sleuthkit/autopsy/test/TestAutopsyService.java b/Core/src/org/sleuthkit/autopsy/test/TestAutopsyService.java new file mode 100644 index 0000000000..b550ca647d --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/test/TestAutopsyService.java @@ -0,0 +1,71 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.test; + +import java.util.logging.Level; +import org.openide.util.lookup.ServiceProvider; +import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.autopsy.framework.AutopsyService; +import org.sleuthkit.autopsy.framework.ProgressIndicator; + +/** + * An implementation of the Autopsy service interface used for test purposes. + */ +//@ServiceProvider(service = AutopsyService.class) +public class TestAutopsyService implements AutopsyService { + + private static final Logger logger = Logger.getLogger(TestAutopsyService.class.getName()); + + @Override + public String getServiceName() { + return "Test Autopsy Service"; + } + + @Override + public void openCaseResources(CaseContext context) throws AutopsyServiceException { + ProgressIndicator progressIndicator = context.getProgressIndicator(); + try { + progressIndicator.start("Test Autopsy Service doing first task..."); + logger.log(Level.INFO, "Test Autopsy Service simulating work on first task"); + Thread.sleep(1000L); + progressIndicator.progress(20); + Thread.sleep(1000L); + progressIndicator.progress(40); + Thread.sleep(1000L); + progressIndicator.progress(60); + Thread.sleep(1000L); + progressIndicator.progress(80); + Thread.sleep(1000L); + progressIndicator.progress(100); + progressIndicator.finish("First task completed by Test Autopsy Service."); + progressIndicator.start("Test Autopsy Service doing second task..."); + for (int i = 0; i < 10000; ++i) { + logger.log(Level.INFO, "Test Autopsy Service simulating work on second task"); + if (context.cancelRequested()) { + logger.log(Level.INFO, "Test Autopsy Service cancelled while doing second task, cancel requested = {0}", context.cancelRequested()); + break; + } + } + progressIndicator.finish("Second task completed by Test Autopsy Service."); + } catch (InterruptedException ex) { + logger.log(Level.INFO, "Test Autopsy Service interrupted (cancelled) while doing first task, cancel requested = {0}", context.cancelRequested()); + } + } + +} diff --git a/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java b/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java index 04fd16c71d..2982f383dd 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java @@ -58,8 +58,7 @@ public final class OpenTimelineAction extends CallableSystemAction implements Pr private static TimeLineController timeLineController = null; private final JButton toolbarButton = new JButton(getName(), - new ImageIcon(getClass().getResource("images/btn_icon_timeline_colorized_26.png"))); //NON-NLS - + new ImageIcon(getClass().getResource("images/btn_icon_timeline_colorized_26.png"))); //NON-NLS /** * Invalidate the reference to the controller so that a new one will be diff --git a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java index 9ad1760ef7..2c5a6472ee 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java @@ -453,8 +453,8 @@ public class TimeLineController { TimeLineController.this.showFullRange(); } else { //prompt user to pick specific event and time range - ShowInTimelineDialog showInTimelineDilaog = - (file == null) + ShowInTimelineDialog showInTimelineDilaog + = (file == null) ? new ShowInTimelineDialog(TimeLineController.this, artifact) : new ShowInTimelineDialog(TimeLineController.this, file); Optional dialogResult = showInTimelineDilaog.showAndWait(); @@ -575,7 +575,6 @@ public class TimeLineController { Case.addPropertyChangeListener(caseListener); listeningToAutopsy = true; } - Platform.runLater(() -> promptForRebuild(file, artifact)); } diff --git a/Core/src/org/sleuthkit/autopsy/timeline/actions/SaveSnapshotAsReport.java b/Core/src/org/sleuthkit/autopsy/timeline/actions/SaveSnapshotAsReport.java index 7f0bf14f3a..04117963c7 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/actions/SaveSnapshotAsReport.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/actions/SaveSnapshotAsReport.java @@ -100,7 +100,7 @@ public class SaveSnapshotAsReport extends Action { setEventHandler(actionEvent -> { //capture generation date and use to make default report name Date generationDate = new Date(); - final String defaultReportName = FileUtil.escapeFileName(currentCase.getName() + " " + new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss").format(generationDate)); //NON_NLS + final String defaultReportName = FileUtil.escapeFileName(currentCase.getDisplayName() + " " + new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss").format(generationDate)); //NON_NLS BufferedImage snapshot = SwingFXUtils.fromFXImage(nodeSupplier.get().snapshot(null, null), null); //prompt user to pick report name diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java index 646191de39..6d37ca2a26 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java @@ -46,7 +46,6 @@ class AutoIngestCase implements Comparable { * * @param caseDirectoryPath The case directory path. */ - // RJCTODO: Throw instead of reporting error, let client decide what to do. AutoIngestCase(Path caseDirectoryPath) { this.caseDirectoryPath = caseDirectoryPath; caseName = PathUtils.caseNameFromCaseDirectoryPath(caseDirectoryPath); @@ -100,7 +99,6 @@ class AutoIngestCase implements Comparable { * * @return The last accessed date. */ - // RJCTODO: Throw instead of reporting error, let client decide what to do. Date getLastAccessedDate() { try { BasicFileAttributes fileAttrs = Files.readAttributes(metadataFilePath, BasicFileAttributes.class); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeletedEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeletedEvent.java index ab559de58e..3d3ff8951f 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeletedEvent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeletedEvent.java @@ -45,20 +45,10 @@ final class AutoIngestCaseDeletedEvent extends AutopsyEvent implements Serializa this.nodeName = nodeName; } - /** - * RJCTODO - * - * @return - */ String getCaseName() { return caseName; } - /** - * RJCTODO - * - * @return - */ String getNodeName() { return nodeName; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseManager.java new file mode 100644 index 0000000000..1b95cd87be --- /dev/null +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseManager.java @@ -0,0 +1,123 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.experimental.autoingest; + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import javax.swing.SwingUtilities; +import org.openide.filesystems.FileObject; +import org.openide.filesystems.FileUtil; +import org.openide.util.actions.CallableSystemAction; +import org.sleuthkit.autopsy.casemodule.AddImageAction; +import org.sleuthkit.autopsy.casemodule.Case; +import org.sleuthkit.autopsy.casemodule.CaseActionException; +import org.sleuthkit.autopsy.casemodule.CaseNewAction; +import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences; + +/** + * Handles locating and opening cases created by auto ingest. + */ +final class AutoIngestCaseManager { + + private static final Logger LOGGER = Logger.getLogger(AutoIngestCaseManager.class.getName()); + private static AutoIngestCaseManager instance; + + /** + * Gets the auto ingest case manager. + * + * @return The auto ingest case manager singleton. + */ + synchronized static AutoIngestCaseManager getInstance() { + if (null == instance) { + instance = new AutoIngestCaseManager(); + } + return instance; + } + + /** + * Constructs an object that handles locating and opening cases created by + * auto ingest. + */ + private AutoIngestCaseManager() { + /* + * Disable the new case action because review mode is only for looking + * at cases created by automated ingest. + */ + CallableSystemAction.get(CaseNewAction.class).setEnabled(false); + + /* + * Permanently delete the "Open Recent Cases" item in the "File" menu. + * This is quite drastic, as it also affects Autopsy standalone mode on + * this machine, but review mode is only for looking at cases created by + * automated ingest. + */ + FileObject root = FileUtil.getConfigRoot(); + FileObject openRecentCasesMenu = root.getFileObject("Menu/Case/OpenRecentCase"); + if (openRecentCasesMenu != null) { + try { + openRecentCasesMenu.delete(); + } catch (IOException ex) { + AutoIngestCaseManager.LOGGER.log(Level.WARNING, "Unable to remove Open Recent Cases file menu item", ex); + } + } + } + + /* + * Gets a list of the cases in the top level case folder used by auto + * ingest. + */ + List getCases() { + List cases = new ArrayList<>(); + List caseFolders = PathUtils.findCaseFolders(Paths.get(AutoIngestUserPreferences.getAutoModeResultsFolder())); + for (Path caseFolderPath : caseFolders) { + cases.add(new AutoIngestCase(caseFolderPath)); + } + return cases; + } + + /** + * Opens an auto ingest case case. + * + * @param caseMetadataFilePath Path to the case metadata file. + * + * @throws CaseActionException + */ + synchronized void openCase(Path caseMetadataFilePath) throws CaseActionException { + /* + * Open the case. + */ + Case.openAsCurrentCase(caseMetadataFilePath.toString()); + + /** + * Disable the add data source action in auto ingest examiner mode. This + * has to be done here because Case.open() calls Case.doCaseChange() and + * the latter method enables the action. Since Case.doCaseChange() + * enables the menus on EDT by calling SwingUtilities.invokeLater(), we + * have to do the same thing here to maintain the order of execution. + */ + SwingUtilities.invokeLater(() -> { + CallableSystemAction.get(AddImageAction.class).setEnabled(false); + }); + } +} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCasePanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.form similarity index 96% rename from Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCasePanel.form rename to Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.form index 2756fa8da0..0c22854c9a 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCasePanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.form @@ -73,7 +73,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -213,7 +213,7 @@ - + @@ -222,10 +222,10 @@ - + - + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCasePanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.java similarity index 88% rename from Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCasePanel.java rename to Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.java index fc45308db7..22b2c83a38 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCasePanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,38 +18,38 @@ */ package org.sleuthkit.autopsy.experimental.autoingest; +import java.awt.Cursor; import java.awt.Desktop; -import java.nio.file.Paths; -import java.util.List; -import javax.swing.JPanel; import java.awt.EventQueue; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.io.IOException; import java.nio.file.Path; +import java.nio.file.Paths; import java.util.Date; +import java.util.List; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.logging.Level; -import org.sleuthkit.autopsy.coreutils.Logger; -import javax.swing.JOptionPane; import javax.swing.JDialog; +import javax.swing.JOptionPane; +import javax.swing.JPanel; import javax.swing.event.ListSelectionEvent; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; -import org.sleuthkit.autopsy.casemodule.StartupWindowProvider; -import java.awt.Cursor; -import java.io.IOException; import org.openide.windows.WindowManager; +import org.sleuthkit.autopsy.casemodule.CaseActionException; import org.sleuthkit.autopsy.casemodule.CaseMetadata; -import org.sleuthkit.autopsy.experimental.autoingest.ReviewModeCaseManager.ReviewModeCaseManagerException; +import org.sleuthkit.autopsy.casemodule.StartupWindowProvider; +import org.sleuthkit.autopsy.coreutils.Logger; /** - * A panel that allows a user to open cases created by automated ingest. + * A panel that allows a user to open cases created by auto ingest. */ -public final class ReviewModeCasePanel extends JPanel { +public final class AutoIngestCasePanel extends JPanel { private static final long serialVersionUID = 1L; - private static final Logger logger = Logger.getLogger(ReviewModeCasePanel.class.getName()); + private static final Logger logger = Logger.getLogger(AutoIngestCasePanel.class.getName()); private static final AutoIngestCase.LastAccessedDateDescendingComparator reverseDateModifiedComparator = new AutoIngestCase.LastAccessedDateDescendingComparator(); private static final int CASE_COL_MIN_WIDTH = 30; private static final int CASE_COL_MAX_WIDTH = 2000; @@ -60,8 +60,8 @@ public final class ReviewModeCasePanel extends JPanel { private static final int STATUS_COL_MIN_WIDTH = 55; private static final int STATUS_COL_MAX_WIDTH = 250; private static final int STATUS_COL_PREFERRED_WIDTH = 60; - private static final int MILLISECONDS_TO_WAIT_BEFORE_STARTING = 500; // RJCTODO: Shorten name - private static final int MILLISECONDS_TO_WAIT_BETWEEN_UPDATES = 30000; // RJCTODO: Shorten name + private static final int MILLIS_TO_WAIT_BEFORE_STARTING = 500; + private static final int MILLIS_TO_WAIT_BETWEEN_UPDATES = 30000; private ScheduledThreadPoolExecutor casesTableRefreshExecutor; /* @@ -71,11 +71,11 @@ public final class ReviewModeCasePanel extends JPanel { * TODO (RC): Consider unifying this stuff in an enum as in * AutoIngestDashboard to make it less error prone. */ - private static final String CASE_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.CaseHeaderText"); - private static final String CREATEDTIME_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.CreatedTimeHeaderText"); - private static final String COMPLETEDTIME_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.LastAccessedTimeHeaderText"); - private static final String STATUS_ICON_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.StatusIconHeaderText"); - private static final String OUTPUT_FOLDER_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.OutputFolderHeaderText"); + private static final String CASE_HEADER = org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "ReviewModeCasePanel.CaseHeaderText"); + private static final String CREATEDTIME_HEADER = org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "ReviewModeCasePanel.CreatedTimeHeaderText"); + private static final String COMPLETEDTIME_HEADER = org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "ReviewModeCasePanel.LastAccessedTimeHeaderText"); + private static final String STATUS_ICON_HEADER = org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "ReviewModeCasePanel.StatusIconHeaderText"); + private static final String OUTPUT_FOLDER_HEADER = org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "ReviewModeCasePanel.OutputFolderHeaderText"); enum COLUMN_HEADERS { @@ -83,7 +83,7 @@ public final class ReviewModeCasePanel extends JPanel { CREATEDTIME, COMPLETEDTIME, STATUS_ICON, - OUTPUTFOLDER // RJCTODO: Change name + OUTPUTFOLDER } private final String[] columnNames = {CASE_HEADER, CREATEDTIME_HEADER, COMPLETEDTIME_HEADER, STATUS_ICON_HEADER, OUTPUT_FOLDER_HEADER}; private DefaultTableModel caseTableModel; @@ -92,8 +92,10 @@ public final class ReviewModeCasePanel extends JPanel { /** * Constructs a panel that allows a user to open cases created by automated * ingest. + * + * @param parent The parent dialog for this panel. */ - public ReviewModeCasePanel(JDialog parent) { + public AutoIngestCasePanel(JDialog parent) { caseTableModel = new DefaultTableModel(columnNames, 0) { private static final long serialVersionUID = 1L; @@ -183,7 +185,7 @@ public final class ReviewModeCasePanel extends JPanel { casesTableRefreshExecutor = new ScheduledThreadPoolExecutor(1); this.casesTableRefreshExecutor.scheduleAtFixedRate(() -> { refreshCasesTable(); - }, MILLISECONDS_TO_WAIT_BEFORE_STARTING, MILLISECONDS_TO_WAIT_BETWEEN_UPDATES, TimeUnit.MILLISECONDS); + }, MILLIS_TO_WAIT_BEFORE_STARTING, MILLIS_TO_WAIT_BETWEEN_UPDATES, TimeUnit.MILLISECONDS); } } @@ -214,7 +216,7 @@ public final class ReviewModeCasePanel extends JPanel { private void refreshCasesTable() { try { currentlySelectedCase = getSelectedCase(); - List theModel = ReviewModeCaseManager.getInstance().getCases(); + List theModel = AutoIngestCaseManager.getInstance().getCases(); EventQueue.invokeLater(new CaseTableRefreshTask(theModel)); } catch (Exception ex) { logger.log(Level.SEVERE, "Unexpected exception in refreshCasesTable", ex); //NON-NLS @@ -279,10 +281,10 @@ public final class ReviewModeCasePanel extends JPanel { private void openCase(Path caseMetadataFilePath) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); try { - ReviewModeCaseManager.getInstance().openCaseInEDT(caseMetadataFilePath); + AutoIngestCaseManager.getInstance().openCase(caseMetadataFilePath); stopCasesTableRefreshes(); StartupWindowProvider.getInstance().close(); - } catch (ReviewModeCaseManagerException ex) { + } catch (CaseActionException ex) { logger.log(Level.SEVERE, String.format("Error while opening case with case metadata file path %s", caseMetadataFilePath), ex); /* * ReviewModeCaseManagerExceptions have user-friendly error @@ -290,7 +292,7 @@ public final class ReviewModeCasePanel extends JPanel { */ JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), ex.getMessage(), - org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.cannotOpenCase"), + org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "ReviewModeCasePanel.cannotOpenCase"), JOptionPane.ERROR_MESSAGE); } finally { @@ -345,18 +347,12 @@ public final class ReviewModeCasePanel extends JPanel { long multiplier = 1; if (rbAllCases.isSelected()) { return true; - } else { - if (rbMonths.isSelected()) { - multiplier = 31; - } else { - if (rbWeeks.isSelected()) { - multiplier = 7; - } else { - if (rbDays.isSelected()) { - multiplier = 1; - } - } - } + } else if (rbMonths.isSelected()) { + multiplier = 31; + } else if (rbWeeks.isSelected()) { + multiplier = 7; + } else if (rbDays.isSelected()) { + multiplier = 1; } return ((currentTime - inputTime) / (1000 * 60 * 60 * 24)) < (numberOfUnits * multiplier); } @@ -387,7 +383,7 @@ public final class ReviewModeCasePanel extends JPanel { setName("Completed Cases"); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(bnOpen, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnOpen.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(bnOpen, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.bnOpen.text")); // NOI18N bnOpen.setEnabled(false); bnOpen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -407,7 +403,7 @@ public final class ReviewModeCasePanel extends JPanel { }); scrollPaneTable.setViewportView(casesTable); - org.openide.awt.Mnemonics.setLocalizedText(bnRefresh, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnRefresh.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(bnRefresh, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.bnRefresh.text")); // NOI18N bnRefresh.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnRefreshActionPerformed(evt); @@ -416,7 +412,7 @@ public final class ReviewModeCasePanel extends JPanel { rbGroupHistoryLength.add(rbAllCases); rbAllCases.setSelected(true); - org.openide.awt.Mnemonics.setLocalizedText(rbAllCases, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbAllCases.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(rbAllCases, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbAllCases.text")); // NOI18N rbAllCases.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { rbAllCasesItemStateChanged(evt); @@ -424,7 +420,7 @@ public final class ReviewModeCasePanel extends JPanel { }); rbGroupHistoryLength.add(rbMonths); - org.openide.awt.Mnemonics.setLocalizedText(rbMonths, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbMonths.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(rbMonths, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbMonths.text")); // NOI18N rbMonths.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { rbMonthsItemStateChanged(evt); @@ -432,7 +428,7 @@ public final class ReviewModeCasePanel extends JPanel { }); rbGroupHistoryLength.add(rbWeeks); - org.openide.awt.Mnemonics.setLocalizedText(rbWeeks, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbWeeks.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(rbWeeks, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbWeeks.text")); // NOI18N rbWeeks.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { rbWeeksItemStateChanged(evt); @@ -440,7 +436,7 @@ public final class ReviewModeCasePanel extends JPanel { }); rbGroupHistoryLength.add(rbDays); - org.openide.awt.Mnemonics.setLocalizedText(rbDays, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbDays.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(rbDays, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbDays.text")); // NOI18N rbDays.setName(""); // NOI18N rbDays.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { @@ -449,7 +445,7 @@ public final class ReviewModeCasePanel extends JPanel { }); rbGroupLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(rbGroupLabel, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbGroupLabel.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(rbGroupLabel, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.rbGroupLabel.text")); // NOI18N javax.swing.GroupLayout panelFilterLayout = new javax.swing.GroupLayout(panelFilter); panelFilter.setLayout(panelFilterLayout); @@ -481,8 +477,8 @@ public final class ReviewModeCasePanel extends JPanel { .addContainerGap()) ); - org.openide.awt.Mnemonics.setLocalizedText(bnShowLog, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnShowLog.text")); // NOI18N - bnShowLog.setToolTipText(org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnShowLog.toolTipText")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(bnShowLog, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.bnShowLog.text")); // NOI18N + bnShowLog.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "AutoIngestCasePanel.bnShowLog.toolTipText")); // NOI18N bnShowLog.setEnabled(false); bnShowLog.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -586,14 +582,14 @@ public final class ReviewModeCasePanel extends JPanel { if (pathToLog.toFile().exists()) { Desktop.getDesktop().edit(pathToLog.toFile()); } else { - JOptionPane.showMessageDialog(this, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.cannotFindLog"), - org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.unableToShowLogFile"), JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "DisplayLogDialog.cannotFindLog"), + org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "DisplayLogDialog.unableToShowLogFile"), JOptionPane.ERROR_MESSAGE); } } catch (IOException ex) { logger.log(Level.SEVERE, String.format("Error attempting to open case auto ingest log file %s", pathToLog), ex); JOptionPane.showMessageDialog(this, - org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.cannotOpenLog"), - org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.unableToShowLogFile"), + org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "DisplayLogDialog.cannotOpenLog"), + org.openide.util.NbBundle.getMessage(AutoIngestCasePanel.class, "DisplayLogDialog.unableToShowLogFile"), JOptionPane.PLAIN_MESSAGE); } } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePrioritizedEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePrioritizedEvent.java index 0687bc9c2e..5fbf380601 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePrioritizedEvent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCasePrioritizedEvent.java @@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.events.AutopsyEvent; * Event published when an automated ingest manager prioritizes all or part of a * case. */ -public final class AutoIngestCasePrioritizedEvent extends AutopsyEvent implements Serializable { // RJCTODO: Rename to AutoIngestPrioritizationEvent +public final class AutoIngestCasePrioritizedEvent extends AutopsyEvent implements Serializable { private static final long serialVersionUID = 1L; private final String caseName; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java index ada7f61206..8372205fc6 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java @@ -24,6 +24,7 @@ import java.nio.file.Paths; import java.time.Instant; import java.util.Comparator; import java.util.Date; +import java.util.Objects; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.Immutable; import javax.annotation.concurrent.ThreadSafe; @@ -55,9 +56,9 @@ public final class AutoIngestJob implements Comparable, Serializa @GuardedBy("this") transient private IngestJob ingestJob; @GuardedBy("this") - transient private boolean cancelled; // RJCTODO: Document + transient private boolean cancelled; @GuardedBy("this") - transient private boolean completed; // RJCTODO: Document + transient private boolean completed; @GuardedBy("this") private Date completedDate; @GuardedBy("this") @@ -81,7 +82,6 @@ public final class AutoIngestJob implements Comparable, Serializa * indicate the the job is not completed, i.e., new * Date(0L). */ - // RJCTODO: The null case directory is error-prone and the nodeName is confusing. AutoIngestJob(Manifest manifest, Path caseDirectoryPath, int priority, String nodeName, Stage stage, Date completedDate, boolean errorsOccurred) { this.manifest = manifest; if (null != caseDirectoryPath) { @@ -112,7 +112,6 @@ public final class AutoIngestJob implements Comparable, Serializa * * @return True or false */ - // RJCTODO: Use this or lose this synchronized boolean hasCaseDirectoryPath() { return (false == this.caseDirectoryPath.isEmpty()); } @@ -161,21 +160,10 @@ public final class AutoIngestJob implements Comparable, Serializa return this.priority; } - /** - * RJCTODO - * - * @param newStage - */ synchronized void setStage(Stage newStage) { setStage(newStage, Date.from(Instant.now())); } - /** - * RJCTODO - * - * @param state - * @param stateStartedDate - */ synchronized void setStage(Stage newState, Date stateStartedDate) { if (Stage.CANCELLING == this.stage && Stage.COMPLETED != newState) { return; @@ -184,29 +172,14 @@ public final class AutoIngestJob implements Comparable, Serializa this.stageStartDate = stateStartedDate; } - /** - * RJCTODO: - * - * @return - */ synchronized Stage getStage() { return this.stage; } - /** - * RJCTODO - * - * @return - */ synchronized Date getStageStartDate() { return this.stageStartDate; } - /** - * RJCTODO - * - * @return - */ synchronized StageDetails getStageDetails() { String description; Date startDate; @@ -223,7 +196,7 @@ public final class AutoIngestJob implements Comparable, Serializa if (!ingestModuleHandle.isCancelled()) { description = ingestModuleHandle.displayName(); } else { - description = String.format(Stage.CANCELLING_MODULE.getDisplayText(), ingestModuleHandle.displayName()); // RJCTODO: FIx this + description = String.format(Stage.CANCELLING_MODULE.getDisplayText(), ingestModuleHandle.displayName()); } } else { /** @@ -248,26 +221,14 @@ public final class AutoIngestJob implements Comparable, Serializa this.dataSourceProcessor = dataSourceProcessor; } - /** - * RJCTODO - */ - // RJCTODO: Consider moving this class into AIM and making this private synchronized void setIngestJob(IngestJob ingestJob) { this.ingestJob = ingestJob; } - /** - * RJCTODO - */ - // RJCTODO: Consider moving this class into AIM and making this private. - // Or move the AID into a separate package. Or do not worry about it. synchronized IngestJob getIngestJob() { return this.ingestJob; } - /** - * RJCTODO - */ synchronized void cancel() { setStage(Stage.CANCELLING); cancelled = true; @@ -280,26 +241,15 @@ public final class AutoIngestJob implements Comparable, Serializa } } - /** - * RJCTODO - */ synchronized boolean isCancelled() { return cancelled; } - /** - * RJCTODO - */ synchronized void setCompleted() { setStage(Stage.COMPLETED); completed = true; } - /** - * RJCTODO - * - * @return - */ synchronized boolean isCompleted() { return completed; } @@ -321,7 +271,7 @@ public final class AutoIngestJob implements Comparable, Serializa * @return True or false. */ synchronized Date getCompletedDate() { - return completedDate; // RJCTODO: Consider returning null if == 0 (epoch) + return completedDate; } /** @@ -342,23 +292,10 @@ public final class AutoIngestJob implements Comparable, Serializa return this.errorsOccurred; } - /** - * RJCTODO Gets name of the node associated with the job, possibly a remote - * hose if the job is in progress. - * - * @return The node name. - */ String getNodeName() { return nodeName; } - /** - * RJCTODO - * - * @param obj - * - * @return - */ @Override public boolean equals(Object obj) { if (!(obj instanceof AutoIngestJob)) { @@ -370,26 +307,12 @@ public final class AutoIngestJob implements Comparable, Serializa return this.getManifest().getFilePath().equals(((AutoIngestJob) obj).getManifest().getFilePath()); } - /** - * RJCTODO - * - * @return - */ @Override public int hashCode() { - // RJCTODO: Update this - int hash = 7; -// hash = 71 * hash + Objects.hashCode(this.dateCreated); + int hash = 71 * (Objects.hashCode(this.caseDirectoryPath)); return hash; } - /** - * RJCTODO Default sorting is by ready file creation date, descending - * - * @param o - * - * @return - */ @Override public int compareTo(AutoIngestJob o) { return -this.getManifest().getDateFileCreated().compareTo(o.getManifest().getDateFileCreated()); @@ -401,14 +324,6 @@ public final class AutoIngestJob implements Comparable, Serializa */ static class ReverseDateCompletedComparator implements Comparator { - /** - * RJCTODO - * - * @param o1 - * @param o2 - * - * @return - */ @Override public int compare(AutoIngestJob o1, AutoIngestJob o2) { return -o1.getStageStartDate().compareTo(o2.getStageStartDate()); @@ -420,14 +335,6 @@ public final class AutoIngestJob implements Comparable, Serializa */ public static class PriorityComparator implements Comparator { - /** - * RJCTODO - * - * @param job - * @param anotherJob - * - * @return - */ @Override public int compare(AutoIngestJob job, AutoIngestJob anotherJob) { return -(job.getPriority().compareTo(anotherJob.getPriority())); @@ -442,14 +349,6 @@ public final class AutoIngestJob implements Comparable, Serializa */ static class AlphabeticalComparator implements Comparator { - /** - * RJCTODO - * - * @param o1 - * @param o2 - * - * @return - */ @Override public int compare(AutoIngestJob o1, AutoIngestJob o2) { if (o1.getNodeName().equalsIgnoreCase(LOCAL_HOST_NAME)) { @@ -462,10 +361,6 @@ public final class AutoIngestJob implements Comparable, Serializa } } - /** - * RJCTODO - */ - // RJCTODO: Combine this enum with StageDetails to make a single class. enum Stage { PENDING("Pending"), @@ -494,40 +389,21 @@ public final class AutoIngestJob implements Comparable, Serializa } - /** - * RJCTODO - */ @Immutable static final class StageDetails { private final String description; private final Date startDate; - /** - * RJCTODO - * - * @param description - * @param startDate - */ private StageDetails(String description, Date startDate) { this.description = description; this.startDate = startDate; } - /** - * RJCTODO - * - * @return - */ String getDescription() { return this.description; } - /** - * RJCTODO - * - * @return - */ Date getStartDate() { return this.startDate; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobEvent.java index e1c9464d00..55248e0a9c 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobEvent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobEvent.java @@ -22,28 +22,17 @@ import java.io.Serializable; import javax.annotation.concurrent.Immutable; import org.sleuthkit.autopsy.events.AutopsyEvent; -/** - * RJCTODO - */ @Immutable abstract class AutoIngestJobEvent extends AutopsyEvent implements Serializable { private static final long serialVersionUID = 1L; private final AutoIngestJob job; - /** - * RJCTODO - * - */ AutoIngestJobEvent(AutoIngestManager.Event eventSubType, AutoIngestJob job) { super(eventSubType.toString(), null, null); this.job = job; } - /** - * RJCTODO - * @return - */ AutoIngestJob getJob() { return this.job; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobLogger.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobLogger.java index 3165ad23c9..161a20286e 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobLogger.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobLogger.java @@ -192,7 +192,7 @@ final class AutoIngestJobLogger { * to acquire an exclusive lock on the * log file. */ - void logDataSourceProcessorCancelled() throws AutoIngestJobLoggerException, InterruptedException { // RJCTODO: Is this used now? + void logDataSourceProcessorCancelled() throws AutoIngestJobLoggerException, InterruptedException { log(MessageCategory.WARNING, "Cancelled adding data source to case"); } @@ -431,7 +431,7 @@ final class AutoIngestJobLogger { * log file. */ private void log(MessageCategory category, String message) throws AutoIngestJobLoggerException, InterruptedException { - try (Lock lock = CoordinationService.getInstance(CoordinationServiceNamespace.getRoot()).tryGetExclusiveLock(CoordinationService.CategoryNode.CASES, getLogPath(caseDirectoryPath).toString(), LOCK_TIME_OUT, LOCK_TIME_OUT_UNIT)) { + try (Lock lock = CoordinationService.getServiceForNamespace(CoordinationServiceNamespace.getRoot()).tryGetExclusiveLock(CoordinationService.CategoryNode.CASES, getLogPath(caseDirectoryPath).toString(), LOCK_TIME_OUT, LOCK_TIME_OUT_UNIT)) { if (null != lock) { File logFile = getLogPath(caseDirectoryPath).toFile(); try (PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(logFile, logFile.exists())), true)) { diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStartedEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStartedEvent.java index de2ef46ffd..b80157b3b4 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStartedEvent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStartedEvent.java @@ -28,9 +28,6 @@ public final class AutoIngestJobStartedEvent extends AutoIngestJobEvent implemen private static final long serialVersionUID = 1L; - /** - * RJCTODO - */ public AutoIngestJobStartedEvent(AutoIngestJob job) { super(AutoIngestManager.Event.JOB_STARTED, job); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStatusEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStatusEvent.java index 23a444f7d7..153cc04ced 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStatusEvent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobStatusEvent.java @@ -28,9 +28,6 @@ public final class AutoIngestJobStatusEvent extends AutoIngestJobEvent implement private static final long serialVersionUID = 1L; - /** - * RJCTODO - */ public AutoIngestJobStatusEvent(AutoIngestJob job) { super(AutoIngestManager.Event.JOB_STATUS_UPDATED, job); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 867ae631e8..eb45ae0df4 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,11 +18,9 @@ */ package org.sleuthkit.autopsy.experimental.autoingest; -import org.sleuthkit.autopsy.coordinationservice.CoordinationServiceNamespace; import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences; import java.io.File; import java.io.IOException; import static java.nio.file.FileVisitOption.FOLLOW_LINKS; @@ -38,9 +36,6 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; -import org.sleuthkit.autopsy.modules.vmextractor.VirtualMachineFinder; -import org.sleuthkit.autopsy.core.UserPreferences; -import org.sleuthkit.datamodel.CaseDbConnectionInfo; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; @@ -54,13 +49,13 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.Observable; import java.util.Set; import java.util.UUID; +import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; @@ -69,65 +64,50 @@ import java.util.stream.Collectors; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.Immutable; import javax.annotation.concurrent.ThreadSafe; -import javax.swing.filechooser.FileFilter; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; -import org.apache.commons.io.FilenameUtils; +import org.apache.solr.client.solrj.impl.HttpSolrServer; +import org.openide.util.Lookup; import org.sleuthkit.autopsy.casemodule.Case; -import org.sleuthkit.autopsy.casemodule.CaseActionException; -import org.sleuthkit.autopsy.ingest.IngestManager; -import org.openide.modules.InstalledFileLocator; import org.sleuthkit.autopsy.casemodule.Case.CaseType; -import org.sleuthkit.autopsy.casemodule.GeneralFilter; -import org.sleuthkit.autopsy.casemodule.ImageDSProcessor; -import org.sleuthkit.autopsy.core.RuntimeProperties; -import org.sleuthkit.autopsy.core.ServicesMonitor; -import org.sleuthkit.autopsy.core.UserPreferencesException; -import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; -import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor; -import org.sleuthkit.autopsy.coreutils.ExecUtil; -import org.sleuthkit.autopsy.coreutils.NetworkUtils; -import org.sleuthkit.autopsy.coreutils.PlatformUtil; -import org.sleuthkit.autopsy.events.AutopsyEvent; -import org.sleuthkit.autopsy.events.AutopsyEventPublisher; -import org.sleuthkit.autopsy.ingest.IngestJob; -import org.sleuthkit.autopsy.ingest.IngestJobSettings; -import org.sleuthkit.datamodel.Content; +import org.sleuthkit.autopsy.casemodule.CaseActionException; +import org.sleuthkit.autopsy.casemodule.CaseMetadata; import org.sleuthkit.autopsy.coordinationservice.CoordinationService; import org.sleuthkit.autopsy.coordinationservice.CoordinationService.CoordinationServiceException; import org.sleuthkit.autopsy.coordinationservice.CoordinationService.Lock; -import org.sleuthkit.autopsy.experimental.configuration.SharedConfiguration; -import org.apache.solr.client.solrj.impl.HttpSolrServer; -import org.openide.util.Lookup; -import org.sleuthkit.autopsy.casemodule.CaseMetadata; -import org.sleuthkit.autopsy.casemodule.LocalFilesDSProcessor; +import org.sleuthkit.autopsy.coordinationservice.CoordinationServiceNamespace; +import org.sleuthkit.autopsy.core.RuntimeProperties; +import org.sleuthkit.autopsy.core.ServicesMonitor; import org.sleuthkit.autopsy.core.ServicesMonitor.ServicesMonitorException; +import org.sleuthkit.autopsy.core.UserPreferences; +import org.sleuthkit.autopsy.core.UserPreferencesException; +import org.sleuthkit.autopsy.framework.AutoIngestDataSourceProcessor; +import org.sleuthkit.autopsy.framework.AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException; +import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult; -import org.sleuthkit.autopsy.coreutils.FileUtil; +import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor; +import org.sleuthkit.autopsy.coreutils.NetworkUtils; +import org.sleuthkit.autopsy.events.AutopsyEvent; import org.sleuthkit.autopsy.events.AutopsyEventException; -import org.sleuthkit.autopsy.ingest.IngestJob.CancellationReason; -import org.sleuthkit.autopsy.ingest.IngestJobStartResult; -import org.sleuthkit.autopsy.ingest.IngestModuleError; +import org.sleuthkit.autopsy.events.AutopsyEventPublisher; +import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestAlertFile.AutoIngestAlertFileException; +import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJobLogger.AutoIngestJobLoggerException; import org.sleuthkit.autopsy.experimental.autoingest.FileExporter.FileExportException; import org.sleuthkit.autopsy.experimental.autoingest.ManifestFileParser.ManifestFileParserException; import org.sleuthkit.autopsy.experimental.autoingest.ManifestNodeData.ProcessingStatus; -import static org.sleuthkit.autopsy.experimental.autoingest.ManifestNodeData.ProcessingStatus.PENDING; -import static org.sleuthkit.autopsy.experimental.autoingest.ManifestNodeData.ProcessingStatus.PROCESSING; import static org.sleuthkit.autopsy.experimental.autoingest.ManifestNodeData.ProcessingStatus.COMPLETED; import static org.sleuthkit.autopsy.experimental.autoingest.ManifestNodeData.ProcessingStatus.DELETED; -import org.sleuthkit.autopsy.corecomponentinterfaces.AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException; -import org.sleuthkit.autopsy.coreutils.FileUtil; -import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestAlertFile.AutoIngestAlertFileException; -import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJobLogger.AutoIngestJobLoggerException; +import static org.sleuthkit.autopsy.experimental.autoingest.ManifestNodeData.ProcessingStatus.PENDING; +import static org.sleuthkit.autopsy.experimental.autoingest.ManifestNodeData.ProcessingStatus.PROCESSING; +import org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences; +import org.sleuthkit.autopsy.experimental.configuration.SharedConfiguration; import org.sleuthkit.autopsy.experimental.configuration.SharedConfiguration.SharedConfigurationException; +import org.sleuthkit.autopsy.ingest.IngestJob; import org.sleuthkit.autopsy.ingest.IngestJob.CancellationReason; -import org.sleuthkit.autopsy.corecomponentinterfaces.AutoIngestDataSourceProcessor; +import org.sleuthkit.autopsy.ingest.IngestJobSettings; +import org.sleuthkit.autopsy.ingest.IngestJobStartResult; +import org.sleuthkit.autopsy.ingest.IngestManager; +import org.sleuthkit.autopsy.ingest.IngestModuleError; +import org.sleuthkit.datamodel.CaseDbConnectionInfo; +import org.sleuthkit.datamodel.Content; /** * An auto ingest manager is responsible for processing auto ingest jobs defined @@ -232,7 +212,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang void startUp() throws AutoIngestManagerStartupException { SYS_LOGGER.log(Level.INFO, "Auto ingest starting"); try { - coordinationService = CoordinationService.getInstance(CoordinationServiceNamespace.getRoot()); + coordinationService = CoordinationService.getServiceForNamespace(CoordinationServiceNamespace.getRoot()); } catch (CoordinationServiceException ex) { throw new AutoIngestManagerStartupException("Failed to get coordination service", ex); } @@ -240,7 +220,8 @@ public final class AutoIngestManager extends Observable implements PropertyChang eventPublisher.openRemoteEventChannel(EVENT_CHANNEL_NAME); SYS_LOGGER.log(Level.INFO, "Opened auto ingest event channel"); } catch (AutopsyEventException ex) { - throw new AutoIngestManagerStartupException("Failed to open aut ingest event channel", ex); + SYS_LOGGER.log(Level.SEVERE, "Failed to open auto ingest event channel", ex); + throw new AutoIngestManagerStartupException("Failed to open auto ingest event channel", ex); } rootInputDirectory = Paths.get(AutoIngestUserPreferences.getAutoModeImageFolder()); rootOutputDirectory = Paths.get(AutoIngestUserPreferences.getAutoModeResultsFolder()); @@ -249,7 +230,13 @@ public final class AutoIngestManager extends Observable implements PropertyChang jobProcessingTaskFuture = jobProcessingExecutor.submit(jobProcessingTask); jobStatusPublishingExecutor.scheduleAtFixedRate(new PeriodicJobStatusEventTask(), JOB_STATUS_EVENT_INTERVAL_SECONDS, JOB_STATUS_EVENT_INTERVAL_SECONDS, TimeUnit.SECONDS); eventPublisher.addSubscriber(EVENT_LIST, instance); - RuntimeProperties.setCoreComponentsActive(false); + try { + RuntimeProperties.setRunningWithGUI(false); + SYS_LOGGER.log(Level.INFO, "Set running with desktop GUI runtime property to false"); + } catch (RuntimeProperties.RuntimePropertiesException ex) { + SYS_LOGGER.log(Level.SEVERE, "Failed to set running with desktop GUI runtime property to false", ex); + throw new AutoIngestManagerStartupException("Failed to set running with desktop GUI runtime property to false", ex); + } state = State.RUNNING; errorState = ErrorState.NONE; } @@ -483,7 +470,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang } for (AutoIngestJob job : hostNamesToRunningJobs.values()) { runningJobs.add(job); - runningJobs.sort(new AutoIngestJob.AlphabeticalComparator()); // RJCTODO: This sort should be done in the AID + runningJobs.sort(new AutoIngestJob.AlphabeticalComparator()); } } if (null != completedJobs) { @@ -502,12 +489,12 @@ public final class AutoIngestManager extends Observable implements PropertyChang } inputScanExecutor.submit(new InputDirScanTask()); } - + /** * Start a scan of the input directories and wait for scan to complete. */ - void scanInputDirsAndWait(){ - if (State.RUNNING != state) { + void scanInputDirsAndWait() { + if (State.RUNNING != state) { return; } SYS_LOGGER.log(Level.INFO, "Starting input scan of {0}", rootInputDirectory); @@ -684,18 +671,22 @@ public final class AutoIngestManager extends Observable implements PropertyChang return CaseDeletionResult.FAILED; } - /* - * Acquire an exclusive lock on the case so it can be safely deleted. - * This will fail if the case is open for review or a deletion operation - * on this case is already in progress on another node. - */ CaseDeletionResult result = CaseDeletionResult.FULLY_DELETED; List manifestFileLocks = new ArrayList<>(); - try (Lock caseLock = coordinationService.tryGetExclusiveLock(CoordinationService.CategoryNode.CASES, caseDirectoryPath.toString())) { - if (null == caseLock) { - return CaseDeletionResult.FAILED; - } + try { synchronized (jobsLock) { + /* + * Get the case metadata. + */ + CaseMetadata metaData; + Path caseMetaDataFilePath = Paths.get(caseDirectoryPath.toString(), caseName + CaseMetadata.getFileExtension()); + try { + metaData = new CaseMetadata(caseMetaDataFilePath); + } catch (CaseMetadata.CaseMetadataException ex) { + SYS_LOGGER.log(Level.SEVERE, String.format("Failed to get case metadata file %s for case %s at %s", caseMetaDataFilePath, caseName, caseDirectoryPath), ex); + return CaseDeletionResult.FAILED; + } + /* * Do a fresh input directory scan. */ @@ -703,12 +694,14 @@ public final class AutoIngestManager extends Observable implements PropertyChang scanner.scan(); Set manifestPaths = casesToManifests.get(caseName); if (null == manifestPaths) { - SYS_LOGGER.log(Level.SEVERE, "No manifest paths found for case {0}", caseName); + SYS_LOGGER.log(Level.SEVERE, String.format("No manifest paths found for case %s at %s", caseName, caseDirectoryPath)); return CaseDeletionResult.FAILED; } /* - * Get all of the required manifest locks. + * Get exclusive locks on all of the manifests for the case. + * This will exclude other auot ingest nodes from doing anything + * with the case. */ for (Path manifestPath : manifestPaths) { try { @@ -719,20 +712,18 @@ public final class AutoIngestManager extends Observable implements PropertyChang return CaseDeletionResult.FAILED; } } catch (CoordinationServiceException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Error attempting to acquire manifest lock for %s for case %s", manifestPath, caseName), ex); + SYS_LOGGER.log(Level.SEVERE, String.format("Error attempting to acquire manifest lock for %s for case %s at %s", manifestPath, caseName, caseDirectoryPath), ex); return CaseDeletionResult.FAILED; } } - /* - * Get the case metadata. - */ - CaseMetadata metaData; - Path caseMetaDataFilePath = Paths.get(caseDirectoryPath.toString(), caseName + CaseMetadata.getFileExtension()); try { - metaData = new CaseMetadata(caseMetaDataFilePath); - } catch (CaseMetadata.CaseMetadataException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Failed to delete case metadata file %s for case %s", caseMetaDataFilePath, caseName)); + /* + * Physically delete the case. + */ + Case.deleteCase(metaData); + } catch (CaseActionException ex) { + SYS_LOGGER.log(Level.SEVERE, String.format("Failed to physically delete case %s at %s", caseName, caseDirectoryPath), ex); return CaseDeletionResult.FAILED; } @@ -745,56 +736,11 @@ public final class AutoIngestManager extends Observable implements PropertyChang nodeData.setStatus(ManifestNodeData.ProcessingStatus.DELETED); coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestPath.toString(), nodeData.toArray()); } catch (InterruptedException | CoordinationServiceException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Error attempting to set delete flag on manifest data for %s for case %s", manifestPath, caseName), ex); + SYS_LOGGER.log(Level.SEVERE, String.format("Error attempting to set delete flag on manifest data for %s for case %s at %s", manifestPath, caseName, caseDirectoryPath), ex); return CaseDeletionResult.PARTIALLY_DELETED; } } - /* - * Try to unload/delete the Solr core from the Solr server. Do - * this before deleting the case directory because the index - * files are in the case directory and the deletion will fail if - * the core is not unloaded first. - */ - String textIndexName = metaData.getTextIndexName(); - try { - unloadSolrCore(metaData.getTextIndexName()); - } catch (Exception ex) { - /* - * Could be a problem, or it could be that the core was - * already unloaded (e.g., by the server due to resource - * constraints). - */ - SYS_LOGGER.log(Level.WARNING, String.format("Error deleting text index %s for %s", textIndexName, caseName), ex); //NON-NLS - } - - /* - * Delete the case database from the database server. - */ - String caseDatabaseName = metaData.getCaseDatabaseName(); - try { - deleteCaseDatabase(caseDatabaseName); - } catch (SQLException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Unable to delete case database %s for %s", caseDatabaseName, caseName), ex); //NON-NLS - result = CaseDeletionResult.PARTIALLY_DELETED; - } catch (UserPreferencesException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Error accessing case database connection info, unable to delete case database %s for %s", caseDatabaseName, caseName), ex); //NON-NLS - result = CaseDeletionResult.PARTIALLY_DELETED; - } catch (ClassNotFoundException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Cannot load database driver, unable to delete case database %s for %s", caseDatabaseName, caseName), ex); //NON-NLS - result = CaseDeletionResult.PARTIALLY_DELETED; - } - - /* - * Delete the case directory. - */ - File caseDirectory = caseDirectoryPath.toFile(); - FileUtil.deleteDir(caseDirectory); - if (caseDirectory.exists()) { - SYS_LOGGER.log(Level.SEVERE, String.format("Failed to delete case directory %s for case %s", caseDirectoryPath, caseName)); - return CaseDeletionResult.PARTIALLY_DELETED; - } - /* * Remove the jobs for the case from the pending jobs queue and * completed jobs list. @@ -809,27 +755,27 @@ public final class AutoIngestManager extends Observable implements PropertyChang notifyObservers(Event.CASE_DELETED); return result; - } catch (CoordinationServiceException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Error acquiring coordination service lock on case %s", caseName), ex); - return CaseDeletionResult.FAILED; - } finally { + /* + * Always release the manifest locks, regardless of the outcome. + */ for (Lock lock : manifestFileLocks) { try { lock.release(); } catch (CoordinationServiceException ex) { - SYS_LOGGER.log(Level.SEVERE, String.format("Failed to release manifest file lock when deleting case %s", caseName), ex); + SYS_LOGGER.log(Level.SEVERE, String.format("Failed to release manifest file lock when deleting case %s at %s", caseName, caseDirectoryPath), ex); } } } } - + /** * Get the current snapshot of the job lists. + * * @return Snapshot of jobs lists */ - JobsSnapshot getCurrentJobsSnapshot(){ - synchronized(jobsLock){ + JobsSnapshot getCurrentJobsSnapshot() { + synchronized (jobsLock) { List runningJobs = new ArrayList<>(); getJobs(null, runningJobs, null); return new JobsSnapshot(pendingJobs, runningJobs, completedJobs); @@ -895,9 +841,8 @@ public final class AutoIngestManager extends Observable implements PropertyChang * Starts the process of cancelling the current job. * * Note that the current job is included in the running list for a while - * because it can take some time - * for the automated ingest process for the job to be shut down in - * an orderly fashion. + * because it can take some time for the automated ingest process for the + * job to be shut down in an orderly fashion. */ void cancelCurrentJob() { if (State.RUNNING != state) { @@ -1655,8 +1600,8 @@ public final class AutoIngestManager extends Observable implements PropertyChang * @throws CoordinationServiceException if there is an error while * acquiring or releasing a * manifest file lock. - * @throws InterruptedException if the thread is interrupted while - * reading the lock data + * @throws InterruptedException if the thread is interrupted + * while reading the lock data */ private Lock dequeueAndLockNextJob() throws CoordinationServiceException, InterruptedException { SYS_LOGGER.log(Level.INFO, "Checking pending jobs queue for ready job, enforcing max jobs per case"); @@ -1694,8 +1639,8 @@ public final class AutoIngestManager extends Observable implements PropertyChang * @throws CoordinationServiceException if there is an error while * acquiring or releasing a * manifest file lock. - * @throws InterruptedException if the thread is interrupted while - * reading the lock data + * @throws InterruptedException if the thread is interrupted + * while reading the lock data */ private Lock dequeueAndLockNextJob(boolean enforceMaxJobsPerCase) throws CoordinationServiceException, InterruptedException { Lock manifestLock = null; @@ -1714,18 +1659,18 @@ public final class AutoIngestManager extends Observable implements PropertyChang */ continue; } - + ManifestNodeData nodeData = new ManifestNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestPath.toString())); - if(! nodeData.getStatus().equals(PENDING)){ + if (!nodeData.getStatus().equals(PENDING)) { /* - * Due to a timing issue or a missed event, - * a non-pending job has ended up on the pending queue. - * Skip the job and remove it from the queue. + * Due to a timing issue or a missed event, a + * non-pending job has ended up on the pending queue. + * Skip the job and remove it from the queue. */ iterator.remove(); continue; } - + if (enforceMaxJobsPerCase) { int currentJobsForCase = 0; for (AutoIngestJob runningJob : hostNamesToRunningJobs.values()) { @@ -1806,9 +1751,9 @@ public final class AutoIngestManager extends Observable implements PropertyChang if (jobProcessingTaskFuture.isCancelled()) { currentJob.cancel(); } - + nodeData = new ManifestNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestPath)); - if(currentJob.isCompleted() || currentJob.isCancelled()){ + if (currentJob.isCompleted() || currentJob.isCancelled()) { nodeData.setStatus(COMPLETED); Date completedDate = new Date(); currentJob.setCompletedDate(completedDate); @@ -1820,7 +1765,6 @@ public final class AutoIngestManager extends Observable implements PropertyChang } coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestPath, nodeData.toArray()); - boolean retry = (!currentJob.isCancelled() && !currentJob.isCompleted()); SYS_LOGGER.log(Level.INFO, "Completed processing of {0}, retry = {1}", new Object[]{manifestPath, retry}); if (currentJob.isCancelled()) { @@ -1892,7 +1836,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang } finally { try { - caseForJob.closeCase(); + Case.closeCurrentCase(); } catch (CaseActionException ex) { Manifest manifest = currentJob.getManifest(); throw new CaseManagementException(String.format("Error closing case %s for %s", manifest.getCaseName(), manifest.getFilePath()), ex); @@ -1983,41 +1927,33 @@ public final class AutoIngestManager extends Observable implements PropertyChang String caseName = manifest.getCaseName(); SYS_LOGGER.log(Level.INFO, "Opening case {0} for {1}", new Object[]{caseName, manifest.getFilePath()}); currentJob.setStage(AutoIngestJob.Stage.OPENING_CASE); - try (Lock caseLock = coordinationService.tryGetExclusiveLock(CoordinationService.CategoryNode.CASES, caseName, 30, TimeUnit.MINUTES)) { - if (null != caseLock) { - try { - Path caseDirectoryPath = PathUtils.findCaseDirectory(rootOutputDirectory, caseName); - if (null != caseDirectoryPath) { - Path metadataFilePath = caseDirectoryPath.resolve(manifest.getCaseName() + CaseMetadata.getFileExtension()); - Case.open(metadataFilePath.toString()); - } else { - caseDirectoryPath = PathUtils.createCaseFolderPath(rootOutputDirectory, caseName); - Case.create(caseDirectoryPath.toString(), currentJob.getManifest().getCaseName(), "", "", CaseType.MULTI_USER_CASE); - /* - * Sleep a bit before releasing the lock to ensure - * that the new case folder is visible on the - * network. - */ - Thread.sleep(AutoIngestUserPreferences.getSecondsToSleepBetweenCases() * 1000); - } - currentJob.setCaseDirectoryPath(caseDirectoryPath); - Case caseForJob = Case.getCurrentCase(); - SYS_LOGGER.log(Level.INFO, "Opened case {0} for {1}", new Object[]{caseForJob.getName(), manifest.getFilePath()}); - return caseForJob; - - } catch (CaseActionException ex) { - throw new CaseManagementException(String.format("Error creating or opening case %s for %s", manifest.getCaseName(), manifest.getFilePath()), ex); - } catch (IllegalStateException ex) { - /* - * Deal with the unfortunate fact that - * Case.getCurrentCase throws IllegalStateException. - */ - throw new CaseManagementException(String.format("Error getting current case %s for %s", manifest.getCaseName(), manifest.getFilePath()), ex); - } - + try { + Path caseDirectoryPath = PathUtils.findCaseDirectory(rootOutputDirectory, caseName); + if (null != caseDirectoryPath) { + Path metadataFilePath = caseDirectoryPath.resolve(manifest.getCaseName() + CaseMetadata.getFileExtension()); + Case.openAsCurrentCase(metadataFilePath.toString()); } else { - throw new CaseManagementException(String.format("Timed out acquiring case name lock for %s for %s", manifest.getCaseName(), manifest.getFilePath())); + caseDirectoryPath = PathUtils.createCaseFolderPath(rootOutputDirectory, caseName); + Case.createAsCurrentCase(caseDirectoryPath.toString(), currentJob.getManifest().getCaseName(), "", "", CaseType.MULTI_USER_CASE); + /* + * Sleep a bit before releasing the lock to ensure that the + * new case folder is visible on the network. + */ + Thread.sleep(AutoIngestUserPreferences.getSecondsToSleepBetweenCases() * 1000); } + currentJob.setCaseDirectoryPath(caseDirectoryPath); + Case caseForJob = Case.getCurrentCase(); + SYS_LOGGER.log(Level.INFO, "Opened case {0} for {1}", new Object[]{caseForJob.getName(), manifest.getFilePath()}); + return caseForJob; + + } catch (CaseActionException ex) { + throw new CaseManagementException(String.format("Error creating or opening case %s for %s", manifest.getCaseName(), manifest.getFilePath()), ex); + } catch (IllegalStateException ex) { + /* + * Deal with the unfortunate fact that Case.getCurrentCase + * throws IllegalStateException. + */ + throw new CaseManagementException(String.format("Error getting current case %s for %s", manifest.getCaseName(), manifest.getFilePath()), ex); } } @@ -2118,7 +2054,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang * Sleep to allow ingest event subscribers to do their event * handling. */ - Thread.sleep(AutoIngestUserPreferences.getSecondsToSleepBetweenCases() * 1000); // RJCTODO: Change the setting description to be more generic + Thread.sleep(AutoIngestUserPreferences.getSecondsToSleepBetweenCases() * 1000); } if (currentJob.isCancelled() || jobProcessingTaskFuture.isCancelled()) { @@ -2200,7 +2136,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang for (AutoIngestDataSourceProcessor processor : processorCandidates) { try { int confidence = processor.canProcess(dataSource.getPath()); - if(confidence > 0){ + if (confidence > 0) { validDataSourceProcessorsMap.put(processor, confidence); } } catch (AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException ex) { @@ -2219,16 +2155,16 @@ public final class AutoIngestManager extends Observable implements PropertyChang SYS_LOGGER.log(Level.WARNING, "Unsupported data source {0} for {1}", new Object[]{dataSource.getPath(), manifestPath}); // NON-NLS return; } - + // Get an ordered list of data source processors to try List validDataSourceProcessors = validDataSourceProcessorsMap.entrySet().stream() - .sorted(Map.Entry.comparingByValue().reversed()) - .map(Map.Entry::getKey) - .collect(Collectors.toList()); + .sorted(Map.Entry.comparingByValue().reversed()) + .map(Map.Entry::getKey) + .collect(Collectors.toList()); synchronized (ingestLock) { // Try each DSP in decreasing order of confidence - for(AutoIngestDataSourceProcessor selectedProcessor:validDataSourceProcessors){ + for (AutoIngestDataSourceProcessor selectedProcessor : validDataSourceProcessors) { jobLogger.logDataSourceProcessorSelected(selectedProcessor.getDataSourceType()); SYS_LOGGER.log(Level.INFO, "Identified data source type for {0} as {1}", new Object[]{manifestPath, selectedProcessor.getDataSourceType()}); try { @@ -2249,7 +2185,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang SYS_LOGGER.log(Level.SEVERE, "All data source processors failed to process {0}", dataSource.getPath()); jobLogger.logFailedToAddDataSource(); // Throw an exception. It will get caught & handled upstream and will result in AIM auto-pause. - throw new AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException("Failed to process " + dataSource.getPath() + " with all data source processors"); + throw new AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException("Failed to process " + dataSource.getPath() + " with all data source processors"); } } finally { currentJob.setDataSourceProcessor(null); @@ -2325,7 +2261,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang jobLogger.logDataSourceProcessorCancelled(); } } - + /** * Analyzes the data source content returned by the data source * processor using the configured set of data source level and file @@ -2370,7 +2306,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang */ ingestLock.wait(); IngestJob.ProgressSnapshot jobSnapshot = ingestJob.getSnapshot(); - for (IngestJob.ProgressSnapshot.DataSourceProcessingSnapshot snapshot : jobSnapshot.getDataSourceSnapshots()) { // RJCTODO: Are "child" jobs IngestJobs or DataSourceIngestJobs? + for (IngestJob.ProgressSnapshot.DataSourceProcessingSnapshot snapshot : jobSnapshot.getDataSourceSnapshots()) { if (!snapshot.isCancelled()) { List cancelledModules = snapshot.getCancelledDataSourceIngestModules(); if (!cancelledModules.isEmpty()) { @@ -2421,7 +2357,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang } } finally { IngestManager.getInstance().removeIngestJobEventListener(ingestJobEventListener); - currentJob.setIngestJob(null); // RJCTODO: Consider moving AutoIngestJob into AutoIngestManager so that this method can be made private + currentJob.setIngestJob(null); } } @@ -2686,7 +2622,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang * remote jobs. The auto ingest job status event is sent only if auto ingest * manager has a currently running auto ingest job. */ - private final class PeriodicJobStatusEventTask implements Runnable { // RJCTODO: Rename to StatusPublishingTask, especially when publishing to the system dashboard + private final class PeriodicJobStatusEventTask implements Runnable { private final long MAX_SECONDS_WITHOUT_UPDATE = JOB_STATUS_EVENT_INTERVAL_SECONDS * MAX_MISSED_JOB_STATUS_UPDATES; @@ -2704,14 +2640,14 @@ public final class AutoIngestManager extends Observable implements PropertyChang notifyObservers(Event.JOB_STATUS_UPDATED); eventPublisher.publishRemotely(new AutoIngestJobStatusEvent(currentJob)); } - - if(AutoIngestUserPreferences.getStatusDatabaseLoggingEnabled()){ + + if (AutoIngestUserPreferences.getStatusDatabaseLoggingEnabled()) { String message; boolean isError = false; - if(getErrorState().equals(ErrorState.NONE)){ - if(currentJob != null){ - message = "Processing " + currentJob.getManifest().getDataSourceFileName() + - " for case " + currentJob.getManifest().getCaseName(); + if (getErrorState().equals(ErrorState.NONE)) { + if (currentJob != null) { + message = "Processing " + currentJob.getManifest().getDataSourceFileName() + + " for case " + currentJob.getManifest().getCaseName(); } else { message = "Paused or waiting for next case"; } @@ -2719,9 +2655,9 @@ public final class AutoIngestManager extends Observable implements PropertyChang message = getErrorState().toString(); isError = true; } - try{ + try { StatusDatabaseLogger.logToStatusDatabase(message, isError); - } catch (SQLException | UserPreferencesException ex){ + } catch (SQLException | UserPreferencesException ex) { SYS_LOGGER.log(Level.WARNING, "Failed to update status database", ex); } } @@ -2778,7 +2714,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang /* * Events published by an auto ingest manager. The events are published * locally to auto ingest manager clients that register as observers and are - * broadcast to other auto ingest nodes. // RJCTODO: Is this true? + * broadcast to other auto ingest nodes. */ enum Event { @@ -2794,31 +2730,31 @@ public final class AutoIngestManager extends Observable implements PropertyChang } /** - * The current auto ingest error state. + * The current auto ingest error state. */ private enum ErrorState { - NONE ("None"), - COORDINATION_SERVICE_ERROR ("Coordination service error"), + NONE("None"), + COORDINATION_SERVICE_ERROR("Coordination service error"), SHARED_CONFIGURATION_DOWNLOAD_ERROR("Shared configuration download error"), - SERVICES_MONITOR_COMMUNICATION_ERROR ("Services monitor communication error"), - DATABASE_SERVER_ERROR ("Database server error"), - KEYWORD_SEARCH_SERVER_ERROR ("Keyword search server error"), - CASE_MANAGEMENT_ERROR ("Case management error"), - ANALYSIS_STARTUP_ERROR ("Analysis startup error"), - FILE_EXPORT_ERROR ("File export error"), - ALERT_FILE_ERROR ("Alert file error"), - JOB_LOGGER_ERROR ("Job logger error"), - DATA_SOURCE_PROCESSOR_ERROR ("Data source processor error"), - UNEXPECTED_EXCEPTION ("Unknown error"); - + SERVICES_MONITOR_COMMUNICATION_ERROR("Services monitor communication error"), + DATABASE_SERVER_ERROR("Database server error"), + KEYWORD_SEARCH_SERVER_ERROR("Keyword search server error"), + CASE_MANAGEMENT_ERROR("Case management error"), + ANALYSIS_STARTUP_ERROR("Analysis startup error"), + FILE_EXPORT_ERROR("File export error"), + ALERT_FILE_ERROR("Alert file error"), + JOB_LOGGER_ERROR("Job logger error"), + DATA_SOURCE_PROCESSOR_ERROR("Data source processor error"), + UNEXPECTED_EXCEPTION("Unknown error"); + private final String desc; - - private ErrorState(String desc){ + + private ErrorState(String desc) { this.desc = desc; } - + @Override - public String toString(){ + public String toString() { return desc; } } @@ -2853,7 +2789,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang * @return The jobs collection. */ List getPendingJobs() { - return this.pendingJobs; + return Collections.unmodifiableList(this.pendingJobs); } /** @@ -2862,7 +2798,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang * @return The jobs collection. */ List getRunningJobs() { - return this.runningJobs; + return Collections.unmodifiableList(this.runningJobs); } /** @@ -2871,14 +2807,11 @@ public final class AutoIngestManager extends Observable implements PropertyChang * @return The jobs collection. */ List getCompletedJobs() { - return this.completedJobs; + return Collections.unmodifiableList(this.completedJobs); } } - /** - * RJCTODO - */ enum CaseDeletionResult { FAILED, PARTIALLY_DELETED, diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutopsyManifestFileParser.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutopsyManifestFileParser.java index 380bbb15a9..0fe33092ca 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutopsyManifestFileParser.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutopsyManifestFileParser.java @@ -34,9 +34,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; -/** - * RJCTODO - */ @Immutable @ServiceProvider(service = ManifestFileParser.class) public final class AutopsyManifestFileParser implements ManifestFileParser { @@ -47,14 +44,6 @@ public final class AutopsyManifestFileParser implements ManifestFileParser { private static final String DEVICE_ID_XPATH = "/Manifest/Collection/Image/ID/text()"; private static final String DATA_SOURCE_NAME_XPATH = "/Manifest/Collection/Image/Name/text()"; - - /** - * RJCTODO - * - * @param filePath - * - * @return - */ @Override public boolean fileIsManifest(Path filePath) { boolean fileIsManifest = false; @@ -71,15 +60,6 @@ public final class AutopsyManifestFileParser implements ManifestFileParser { return fileIsManifest; } - /** - * RJCTODO - * - * @param filePath - * - * @return - * - * @throws org.sleuthkit.autopsy.experimental.autoingest.ManifestFileParser.ManifestFileParserException - */ @Override public Manifest parse(Path filePath) throws ManifestFileParserException { if (!fileIsManifest(filePath)) { @@ -102,17 +82,6 @@ public final class AutopsyManifestFileParser implements ManifestFileParser { } } - /** - * RJCTODO - * - * @param manifestFilePath - * - * @return - * - * @throws ParserConfigurationException - * @throws SAXException - * @throws IOException - */ private Document createManifestDOM(Path manifestFilePath) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index d5fa88092b..cddf2ed860 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -89,13 +89,6 @@ OpenIDE-Module-Long-Description=\ We make no guarantee that the API of this module will not change, so developers should be careful when relying on it. OpenIDE-Module-Name=Experimental OpenIDE-Module-Short-Description=This module contains features that are being developed by Basis Technology and are not part of the default Autopsy distribution. -ReviewModeCasePanel.bnRefresh.text=&Refresh -ReviewModeCasePanel.bnOpen.text=&Open -ReviewModeCasePanel.rbGroupLabel.text=Show Last 10: -ReviewModeCasePanel.rbDays.text=Days -ReviewModeCasePanel.rbWeeks.text=Weeks -ReviewModeCasePanel.rbMonths.text=Months -ReviewModeCasePanel.rbAllCases.text=Everything ReviewModeCasePanel.cannotOpenCase=Cannot Open Case ReviewModeCasePanel.casePathNotFound=Case path not found ReviewModeCasePanel.caseIsLocked=Single-user case is locked. @@ -170,12 +163,10 @@ CopyFilesPanel.ConfirmCopyAdd=exists. Do you really want to copy more files to t CopyFilesPanel.ConfirmCopyYes=Copy CopyFilesPanel.ConfirmCopyNo=Do not copy ConfirmationDialog.ConfirmUnlockHeader=Confirm Case Unlock -ReviewModeCasePanel.bnShowLog.text=&Show Log AutoIngestDashboard.bnPrioritizeCase.toolTipText=Move all images associated with a case to top of Pending queue. AutoIngestDashboard.bnPrioritizeCase.text=Prioriti&ze Case AutoIngestDashboard.bnShowCaseLog.toolTipText=Display case log file for selected case AutoIngestDashboard.bnShowCaseLog.text=Show Case &Log -ReviewModeCasePanel.bnShowLog.toolTipText=Display case log file for selected case CopyFilesPanel.bnCancelPendingJob.text=Ca&ncel CopyFilesPanel.tbDestinationCase.text= CopyFilesPanel.cbThrottleNetwork.text=&Throttle Network @@ -298,3 +289,12 @@ AutoIngestDashboard.bnPrioritizeJob.toolTipText=Move this folder to the top of t AutoIngestDashboard.bnReprocessJob.text=Reprocess Job AutoIngestDashboard.bnPrioritizeFolder.label= AutoIngestDashboard.bnPrioritizeJob.actionCommand= +AutoIngestCasePanel.rbDays.text=Days +AutoIngestCasePanel.rbWeeks.text=Weeks +AutoIngestCasePanel.rbMonths.text=Months +AutoIngestCasePanel.rbAllCases.text=Everything +AutoIngestCasePanel.bnRefresh.text=&Refresh +AutoIngestCasePanel.bnOpen.text=&Open +AutoIngestCasePanel.bnShowLog.toolTipText=Display case log file for selected case +AutoIngestCasePanel.bnShowLog.text=&Show Log +AutoIngestCasePanel.rbGroupLabel.text=Show Last 10: diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/CaseImportPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/CaseImportPanel.java index d1ee4c3865..34c361b3c6 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/CaseImportPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/CaseImportPanel.java @@ -108,7 +108,7 @@ public class CaseImportPanel extends javax.swing.JPanel implements ImportDoneCal if (!UserPreferences.getIsMultiUserModeEnabled()) { tbOops.setText(MULTI_USER_SETTINGS_MUST_BE_ENABLED); return; - } else if (RuntimeProperties.coreComponentsAreActive()) { + } else if (RuntimeProperties.runningWithGUI()) { tbOops.setText(AIM_MUST_BE_ENABLED); return; } else { @@ -674,7 +674,7 @@ public class CaseImportPanel extends javax.swing.JPanel implements ImportDoneCal private void enableStartButton() { if (UserPreferences.getIsMultiUserModeEnabled() && AutoIngestUserPreferences.getJoinAutoModeCluster() - && (! RuntimeProperties.coreComponentsAreActive()) + && (! RuntimeProperties.runningWithGUI()) && !tbCaseSource.getText().isEmpty() && !tbCaseDestination.getText().isEmpty() && canTalkToDb == true diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java index 3acf895a9d..e5d7f1a6a3 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java @@ -29,9 +29,6 @@ import java.util.HashMap; import java.util.Map; import javax.annotation.concurrent.Immutable; -/** - * RJCTODO - */ @Immutable public final class Manifest implements Serializable { @@ -43,17 +40,6 @@ public final class Manifest implements Serializable { private final String dataSourcePath; private final Map manifestProperties; - /** - * RJCTODO - * - * @param manifestFilePath - * @param caseName - * @param deviceId - * @param dataSourcePath - * @param manifestProperties - * - * @throws IOException - */ public Manifest(Path manifestFilePath, String caseName, String deviceId, Path dataSourcePath, Map manifestProperties) throws IOException { this.filePath = manifestFilePath.toString(); BasicFileAttributes attrs = Files.readAttributes(manifestFilePath, BasicFileAttributes.class); @@ -64,65 +50,30 @@ public final class Manifest implements Serializable { this.manifestProperties = new HashMap<>(manifestProperties); } - /** - * RJCTODO - * - * @return - */ public Path getFilePath() { return Paths.get(this.filePath); } - /** - * RJCTODO - * - * @return - * @throws IOException - */ public Date getDateFileCreated() { return this.dateFileCreated; } - /** - * RJCTODO - * - * @return - */ public String getCaseName() { return caseName; } - /** - * RJCTODO - * - * @return - */ public String getDeviceId() { return deviceId; } - /** - * RJCTODO - * - * @return - */ public Path getDataSourcePath() { return Paths.get(dataSourcePath); } - /** - * RJCTODO - * @return - */ public String getDataSourceFileName() { return Paths.get(dataSourcePath).getFileName().toString(); } - /** - * RJCTODO - * - * @return - */ public Map getManifestProperties() { return new HashMap<>(manifestProperties); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestFileParser.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestFileParser.java index 14111b0410..00fb2b9a5f 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestFileParser.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestFileParser.java @@ -20,17 +20,11 @@ package org.sleuthkit.autopsy.experimental.autoingest; import java.nio.file.Path; -/** - * RJCTODO: - */ public interface ManifestFileParser { boolean fileIsManifest(Path filePath); Manifest parse(Path filePath) throws ManifestFileParserException; - /** - * Exception thrown if a manifest file cannot be parsed. RJCTODO - */ public final static class ManifestFileParserException extends Exception { private static final long serialVersionUID = 1L; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestNodeData.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestNodeData.java index e4e272edd3..498ac38cee 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestNodeData.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ManifestNodeData.java @@ -99,9 +99,6 @@ final class ManifestNodeData { * * @return True or false. */ - // RJCTODO: This is confusing, consider changing the API so that the use case is to - // check the length of the node data from the coordination service before - // constructing an instance of this object. That would be much more clear! boolean coordSvcNodeDataWasSet() { return this.coordSvcNodeDataWasSet; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PathUtils.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PathUtils.java index 622912f95a..852ab4714f 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PathUtils.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PathUtils.java @@ -69,7 +69,7 @@ final class PathUtils { * * @return A list of the output case folder paths. */ - static List findCaseFolders(Path folderToSearch) { // RJCTODO: Rename + static List findCaseFolders(Path folderToSearch) { File searchFolder = new File(folderToSearch.toString()); if (!searchFolder.isDirectory()) { return Collections.emptyList(); @@ -135,7 +135,7 @@ final class PathUtils { * * @return A case folder path with a time stamp suffix. */ - static Path createCaseFolderPath(Path caseFoldersPath, String caseName) { // RJCTODO: Rename + static Path createCaseFolderPath(Path caseFoldersPath, String caseName) { String folderName = caseName + "_" + TimeStampUtils.createTimeStamp(); return Paths.get(caseFoldersPath.toString(), folderName); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCaseManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCaseManager.java deleted file mode 100644 index 2cae50ef1a..0000000000 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/ReviewModeCaseManager.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2015 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.sleuthkit.autopsy.experimental.autoingest; - -import java.io.IOException; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; -import javax.swing.SwingUtilities; -import org.openide.filesystems.FileObject; -import org.openide.filesystems.FileUtil; -import org.openide.util.actions.CallableSystemAction; -import org.sleuthkit.autopsy.casemodule.AddImageAction; -import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.autopsy.casemodule.Case; -import org.sleuthkit.autopsy.casemodule.CaseActionException; -import org.sleuthkit.autopsy.casemodule.CaseNewAction; -import org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences; -import org.sleuthkit.autopsy.coordinationservice.CoordinationService; - -/** - * Handles opening, locking, and unlocking cases in review mode. Instances of - * this class are tightly coupled to the Autopsy "current case" concept and the - * Autopsy UI, and cases must be opened by code executing in the event - * dispatch thread (EDT). Because of the tight coupling to the UI, exception - * messages are deliberately user-friendly. - */ -final class ReviewModeCaseManager { - - /* - * Provides uniform exceptions with user-friendly error messages. - */ - final class ReviewModeCaseManagerException extends Exception { - - private static final long serialVersionUID = 1L; - - private ReviewModeCaseManagerException(String message) { - super(message); - } - - private ReviewModeCaseManagerException(String message, Throwable cause) { - super(message, cause); - } - - } - - private static final Logger logger = Logger.getLogger(ReviewModeCaseManager.class.getName()); - private static ReviewModeCaseManager instance; - private CoordinationService.Lock currentCaseLock; - - /** - * Gets the review mode case manager. - * - * @return The review mode case manager singleton. - */ - synchronized static ReviewModeCaseManager getInstance() { - if (instance == null) { - instance = new ReviewModeCaseManager(); - } - return instance; - } - - /** - * Constructs a review mode case manager to handles opening, locking, and - * unlocking cases in review mode. Instances of this class are tightly - * coupled to the Autopsy "current case" concept and the Autopsy UI, - * and cases must be opened by code executing in the event dispatch thread - * (EDT). Because of the tight coupling to the UI, exception messages are - * deliberately user-friendly. - * - */ - private ReviewModeCaseManager() { - /* - * Disable the new case action because review mode is only for looking - * at cases created by automated ingest. - */ - CallableSystemAction.get(CaseNewAction.class).setEnabled(false); - - /* - * Permanently delete the "Open Recent Cases" item in the "File" menu. - * This is quite drastic, as it also affects Autopsy standalone mode on - * this machine, but review mode is only for looking at cases created by - * automated ingest. - */ - FileObject root = FileUtil.getConfigRoot(); - FileObject openRecentCasesMenu = root.getFileObject("Menu/Case/OpenRecentCase"); - if (openRecentCasesMenu != null) { - try { - openRecentCasesMenu.delete(); - } catch (IOException ex) { - ReviewModeCaseManager.logger.log(Level.WARNING, "Unable to remove Open Recent Cases file menu item", ex); - } - } - } - - /* - * Gets a list of the cases in the top level case folder used by automated - * ingest. - */ - List getCases() { - List cases = new ArrayList<>(); - List caseFolders = PathUtils.findCaseFolders(Paths.get(AutoIngestUserPreferences.getAutoModeResultsFolder())); - for (Path caseFolderPath : caseFolders) { - cases.add(new AutoIngestCase(caseFolderPath)); - } - return cases; - } - - /** - * Attempts to open a case as the current case. Assumes it is called by code - * executing in the event dispatch thread (EDT). - * - * @param caseMetadataFilePath Path to the case metadata file. - * - * @throws ReviewModeCaseManagerException - */ - /* - * TODO (RC): With a little work, the lock acquisition/release could be done - * by a thread in a single thread executor, removing the "do it in the EDT" - * requirement - */ - synchronized void openCaseInEDT(Path caseMetadataFilePath) throws ReviewModeCaseManagerException { - try { - /* - * Open the case. - */ - Case.open(caseMetadataFilePath.toString()); - - /** - * Disable the add data source action in review mode. This has to be - * done here because Case.open() calls Case.doCaseChange() and the - * latter method enables the action. Since Case.doCaseChange() - * enables the menus on EDT by calling SwingUtilities.invokeLater(), - * we have to do the same thing here to maintain the order of - * execution. - */ - SwingUtilities.invokeLater(() -> { - CallableSystemAction.get(AddImageAction.class).setEnabled(false); - }); - - } catch (CaseActionException ex) { - throw new ReviewModeCaseManagerException(String.format("Could not open the case (%s), contract administrator", ex.getMessage()), ex); - } - } -} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form index f8494d8fa0..dd372c93a0 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form @@ -20,637 +20,657 @@ - + + + + + - + - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + - + + + + - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java index 8ba7e76a2e..149e9c6130 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java @@ -651,6 +651,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { private void initComponents() { modeRadioButtons = new javax.swing.ButtonGroup(); + nodeScrollPane = new javax.swing.JScrollPane(); nodePanel = new javax.swing.JPanel(); jPanelNodeType = new javax.swing.JPanel(); jLabelSelectMode = new javax.swing.JLabel(); @@ -687,6 +688,10 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { cbJoinAutoIngestCluster = new javax.swing.JCheckBox(); tbOops = new javax.swing.JTextField(); + nodeScrollPane.setMinimumSize(new java.awt.Dimension(0, 0)); + + nodePanel.setMinimumSize(new java.awt.Dimension(100, 100)); + jPanelNodeType.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.jPanelNodeType.border.title"))); // NOI18N jPanelNodeType.setMinimumSize(new java.awt.Dimension(50, 50)); @@ -1048,15 +1053,20 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addComponent(jPanelSharedConfig, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); + nodeScrollPane.setViewportView(nodePanel); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(nodePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addGap(0, 0, 0) + .addComponent(nodeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(nodePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(nodeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); }// //GEN-END:initComponents @@ -1441,6 +1451,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { private javax.swing.JCheckBox masterNodeCheckBox; private javax.swing.ButtonGroup modeRadioButtons; private javax.swing.JPanel nodePanel; + private javax.swing.JScrollPane nodeScrollPane; private javax.swing.JTextField outputPathTextField; private javax.swing.JProgressBar pbTaskInProgress; private javax.swing.JLabel restartRequiredNodeLabel; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanelController.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanelController.java index 470c69076b..50e2e18e4c 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanelController.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanelController.java @@ -98,6 +98,7 @@ public final class AutoIngestSettingsPanelController extends OptionsPanelControl private AutoIngestSettingsPanel getPanel() { if (panel == null) { panel = new AutoIngestSettingsPanel(this); + panel.setSize(750, 600); //makes the panel large enough to hide the scroll bar } return panel; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties index f24f1e6f55..6a0dff8806 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties @@ -85,7 +85,6 @@ OpenOptionsPanelAction.name=Auto Ingest Options OptionsCategory_Keywords_Auto_Ingest_Settings=Auto Ingest Settings OptionsCategory_Keywords_General=Options OptionsCategory_Name_Auto_Ingest=Auto Ingest -OptionsCategory_Name_General=Autopsy OptionsDialog.jButton1.text=jButton1 OptionsDialog.jCheckBox1.text=jCheckBox1 OptionsDialog.jLabel1.text=jLabel1 diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java index 7599ed4648..653fc65807 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java @@ -160,7 +160,7 @@ public class SharedConfiguration { File remoteFolder = getSharedFolder(); - try (Lock writeLock = CoordinationService.getInstance(LOCK_ROOT).tryGetExclusiveLock(CoordinationService.CategoryNode.CONFIG, remoteFolder.getAbsolutePath(), 30, TimeUnit.MINUTES)) { + try (Lock writeLock = CoordinationService.getServiceForNamespace(LOCK_ROOT).tryGetExclusiveLock(CoordinationService.CategoryNode.CONFIG, remoteFolder.getAbsolutePath(), 30, TimeUnit.MINUTES)) { if (writeLock == null) { logger.log(Level.INFO, String.format("Failed to lock %s - another node is currently uploading or downloading configuration", remoteFolder.getAbsolutePath())); return SharedConfigResult.LOCKED; @@ -230,7 +230,7 @@ public class SharedConfiguration { File remoteFolder = getSharedFolder(); - try (Lock readLock = CoordinationService.getInstance(LOCK_ROOT).tryGetSharedLock(CoordinationService.CategoryNode.CONFIG, remoteFolder.getAbsolutePath(), 30, TimeUnit.MINUTES)) { + try (Lock readLock = CoordinationService.getServiceForNamespace(LOCK_ROOT).tryGetSharedLock(CoordinationService.CategoryNode.CONFIG, remoteFolder.getAbsolutePath(), 30, TimeUnit.MINUTES)) { if (readLock == null) { return SharedConfigResult.LOCKED; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java index fbffcf7ece..ce76b1eea1 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java @@ -35,7 +35,7 @@ import org.sleuthkit.autopsy.casemodule.CueBannerPanel; import org.sleuthkit.autopsy.casemodule.StartupWindowInterface; import org.sleuthkit.autopsy.coreutils.NetworkUtils; import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestDashboard; -import org.sleuthkit.autopsy.experimental.autoingest.ReviewModeCasePanel; +import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestCasePanel; /** * The default implementation of the Autopsy startup window @@ -47,7 +47,7 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa private static Dimension DIMENSIONS = new Dimension(750, 400); private static CueBannerPanel welcomeWindow; private static final long serialVersionUID = 1L; - private ReviewModeCasePanel caseManagementPanel = null; + private AutoIngestCasePanel caseManagementPanel = null; private static final String LOCAL_HOST_NAME = NetworkUtils.getLocalHostName(); public StartupWindow() { @@ -120,7 +120,7 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa break; case REVIEW: this.setTitle(NbBundle.getMessage(StartupWindow.class, "StartupWindow.ReviewMode") + " (" + LOCAL_HOST_NAME + ")"); - caseManagementPanel = new ReviewModeCasePanel(this); + caseManagementPanel = new AutoIngestCasePanel(this); setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/experimental/images/frame.gif", false)); //NON-NLS add(caseManagementPanel); break; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java index 55fb260bbd..f85b5a4050 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java @@ -917,7 +917,7 @@ public final class ImageGalleryController implements Executor { @Override public void propertyChange(PropertyChangeEvent evt) { - if (RuntimeProperties.coreComponentsAreActive() == false) { + if (RuntimeProperties.runningWithGUI() == false) { /* * Running in "headless" mode, no need to process any events. * This cannot be done earlier because the switch to core @@ -978,7 +978,7 @@ public final class ImageGalleryController implements Executor { @Override public void propertyChange(PropertyChangeEvent evt) { - if (RuntimeProperties.coreComponentsAreActive() == false) { + if (RuntimeProperties.runningWithGUI() == false) { /* * Running in "headless" mode, no need to process any events. * This cannot be done earlier because the switch to core diff --git a/KeywordSearch/UpgradeTools/Solr4IndexUpgrade.java b/KeywordSearch/UpgradeTools/Solr4IndexUpgrade.java new file mode 100644 index 0000000000..97f0dfbdb9 --- /dev/null +++ b/KeywordSearch/UpgradeTools/Solr4IndexUpgrade.java @@ -0,0 +1,69 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2016 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package solr4indexupgrade; + +import java.io.File; +import java.io.IOException; +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.standard.StandardAnalyzer; +import org.apache.lucene.index.IndexUpgrader; +import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.store.Directory; +import org.apache.lucene.store.FSDirectory; + +/** + * This class upgrades Solr 4 index to Solr 5 index. + */ +public class Solr4IndexUpgrade { + + /** + * Upgrades Solr 4 index to Solr 5 index. + * @param args the command line arguments + * @throws java.io.IOException + */ + public static void main(String[] args) throws IOException { + + if (args.length != 1) { + System.out.println("Must pass 1 input argument"); + showUsage(); + throw new IllegalArgumentException("Must pass 1 argument"); + } + String solr4path = args[0]; + upgrade(solr4path); + } + + /** + * Display usage information for JDiff. + */ + public static void showUsage() { + System.out.println("usage: java -jar Solr4IndexUpgrade.jar \"\\path\\to\\index\""); + } + + private static void upgrade(String solr4path) throws IOException { + + Directory dir = FSDirectory.open(new File(solr4path).toPath()); + + // upgrade from Solr 4 to Solr 5 + IndexWriterConfig config; + Analyzer analyzer = new StandardAnalyzer(); + config = new IndexWriterConfig(analyzer); + IndexUpgrader upgrader = new IndexUpgrader(dir, config, true); + upgrader.upgrade(); + } +} diff --git a/KeywordSearch/UpgradeTools/Solr5IndexUpgrade.java b/KeywordSearch/UpgradeTools/Solr5IndexUpgrade.java new file mode 100644 index 0000000000..f434d71d8d --- /dev/null +++ b/KeywordSearch/UpgradeTools/Solr5IndexUpgrade.java @@ -0,0 +1,70 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2016 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package solr5indexupgrade; + +import java.io.File; +import java.io.IOException; +import org.apache.lucene.analysis.core.KeywordAnalyzer; +import org.apache.lucene.index.IndexWriter; +import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.UpgradeIndexMergePolicy; +import org.apache.lucene.store.Directory; +import org.apache.lucene.store.FSDirectory; + +/** + * This class upgrades Solr 5 index to Solr 6 index. + */ +public class Solr5IndexUpgrade { + + /** + * Upgrades Solr 5 index to Solr 6 index. + * @param args the command line arguments + * @throws java.io.IOException + */ + public static void main(String[] args) throws IOException { + + if (args.length != 1) { + System.out.println("Must pass 1 argument"); + showUsage(); + throw new IllegalArgumentException("Must pass 1 argument"); + } + String solr5path = args[0]; + upgrade(solr5path); + } + + /** + * Display usage information for JDiff. + */ + public static void showUsage() { + System.out.println("usage: java -jar Solr5IndexUpgrade.jar \"\\path\\to\\index\""); + } + + private static void upgrade(String solr4path) throws IOException { + + Directory dir = FSDirectory.open(new File(solr4path).toPath()); + + + // upgrade from Solr 5 to Solr 6 + IndexWriterConfig iwc = new IndexWriterConfig(new KeywordAnalyzer()); + iwc.setMergePolicy(new UpgradeIndexMergePolicy(iwc.getMergePolicy())); + IndexWriter w = new IndexWriter(dir, iwc); + w.forceMerge(1); + w.close(); + } +} diff --git a/KeywordSearch/build.xml b/KeywordSearch/build.xml index c63f0c15b0..a9b2d0fe4c 100644 --- a/KeywordSearch/build.xml +++ b/KeywordSearch/build.xml @@ -43,8 +43,6 @@ - - diff --git a/KeywordSearch/ivy.xml b/KeywordSearch/ivy.xml index 910df91cc8..3728514fcd 100644 --- a/KeywordSearch/ivy.xml +++ b/KeywordSearch/ivy.xml @@ -7,19 +7,16 @@ - - - - + - + @@ -32,7 +29,6 @@ - diff --git a/KeywordSearch/nbproject/project.xml b/KeywordSearch/nbproject/project.xml index 32bd79c8a2..f990e7a88d 100644 --- a/KeywordSearch/nbproject/project.xml +++ b/KeywordSearch/nbproject/project.xml @@ -238,8 +238,8 @@ release/modules/ext/asm-all-3.1.jar - ext/solr-solrj-4.9.1-javadoc.jar - release/modules/ext/solr-solrj-4.9.1-javadoc.jar + ext/solr-solrj-6.2.1-javadoc.jar + release/modules/ext/solr-solrj-6.2.1-javadoc.jar ext/poi-3.10-beta2.jar @@ -278,8 +278,8 @@ release/modules/ext/org.osgi.core-4.0.0.jar - ext/httpclient-4.3.1.jar - release/modules/ext/httpclient-4.3.1.jar + ext/httpclient-4.4.1.jar + release/modules/ext/httpclient-4.4.1.jar ext/isoparser-1.0-RC-1.jar @@ -310,8 +310,8 @@ release/modules/ext/org.apache.felix.scr.generator-1.1.2.jar - ext/solr-solrj-4.9.1.jar - release/modules/ext/solr-solrj-4.9.1.jar + ext/solr-solrj-6.2.1.jar + release/modules/ext/solr-solrj-6.2.1.jar ext/poi-scratchpad-3.10-beta2.jar @@ -326,16 +326,20 @@ release/modules/ext/vorbis-java-core-0.1-tests.jar - ext/commons-io-2.3.jar - release/modules/ext/commons-io-2.3.jar + ext/commons-io-2.5.jar + release/modules/ext/commons-io-2.5.jar + + ext/commons-codec-1.5.jar + release/modules/ext/commons-codec-1.5.jar + ext/jericho-html-3.3-sources.jar release/modules/ext/jericho-html-3.3-sources.jar - ext/solr-solrj-4.9.1-sources.jar - release/modules/ext/solr-solrj-4.9.1-sources.jar + ext/solr-solrj-6.2.1-sources.jar + release/modules/ext/solr-solrj-6.2.1-sources.jar ext/juniversalchardet-1.0.3.jar @@ -346,24 +350,28 @@ release/modules/ext/org.apache.felix.scr.annotations-1.6.0.jar - ext/noggit-0.5.jar - release/modules/ext/noggit-0.5.jar + ext/noggit-0.6.jar + release/modules/ext/noggit-0.6.jar ext/apache-mime4j-core-0.7.2.jar release/modules/ext/apache-mime4j-core-0.7.2.jar - ext/httpmime-4.3.1.jar - release/modules/ext/httpmime-4.3.1.jar + ext/httpmime-4.4.1.jar + release/modules/ext/httpmime-4.4.1.jar ext/qdox-1.12.jar release/modules/ext/qdox-1.12.jar - ext/httpcore-4.3.jar - release/modules/ext/httpcore-4.3.jar + ext/httpcore-4.4.1.jar + release/modules/ext/httpcore-4.4.1.jar + + + ext/commons-validator-1.5.1.jar + release/modules/ext/commons-validator-1.5.1.jar ext/commons-validator-1.5.1.jar diff --git a/KeywordSearch/release/Solr4to5IndexUpgrade/Solr4IndexUpgrade.jar b/KeywordSearch/release/Solr4to5IndexUpgrade/Solr4IndexUpgrade.jar new file mode 100644 index 0000000000..764fc7df8d Binary files /dev/null and b/KeywordSearch/release/Solr4to5IndexUpgrade/Solr4IndexUpgrade.jar differ diff --git a/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-analyzers-common-5.5.1.jar b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-analyzers-common-5.5.1.jar new file mode 100644 index 0000000000..ec29040eea Binary files /dev/null and b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-analyzers-common-5.5.1.jar differ diff --git a/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-backward-codecs-5.5.1.jar b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-backward-codecs-5.5.1.jar new file mode 100644 index 0000000000..b956d2eba5 Binary files /dev/null and b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-backward-codecs-5.5.1.jar differ diff --git a/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-codecs-5.5.1.jar b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-codecs-5.5.1.jar new file mode 100644 index 0000000000..fdc493651f Binary files /dev/null and b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-codecs-5.5.1.jar differ diff --git a/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-core-5.5.1.jar b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-core-5.5.1.jar new file mode 100644 index 0000000000..c52dd9e33f Binary files /dev/null and b/KeywordSearch/release/Solr4to5IndexUpgrade/lib/lucene-core-5.5.1.jar differ diff --git a/KeywordSearch/release/Solr5to6IndexUpgrade/Solr5IndexUpgrade.jar b/KeywordSearch/release/Solr5to6IndexUpgrade/Solr5IndexUpgrade.jar new file mode 100644 index 0000000000..9a18d23a98 Binary files /dev/null and b/KeywordSearch/release/Solr5to6IndexUpgrade/Solr5IndexUpgrade.jar differ diff --git a/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-analyzers-common-6.2.1.jar b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-analyzers-common-6.2.1.jar new file mode 100644 index 0000000000..52df2a773f Binary files /dev/null and b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-analyzers-common-6.2.1.jar differ diff --git a/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-backward-codecs-6.2.1.jar b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-backward-codecs-6.2.1.jar new file mode 100644 index 0000000000..30cf3b9576 Binary files /dev/null and b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-backward-codecs-6.2.1.jar differ diff --git a/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-codecs-6.2.1.jar b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-codecs-6.2.1.jar new file mode 100644 index 0000000000..c61005b61b Binary files /dev/null and b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-codecs-6.2.1.jar differ diff --git a/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-core-6.2.1.jar b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-core-6.2.1.jar new file mode 100644 index 0000000000..e557e1b955 Binary files /dev/null and b/KeywordSearch/release/Solr5to6IndexUpgrade/lib/lucene-core-6.2.1.jar differ diff --git a/KeywordSearch/release/solr/bin/autopsy-solr.cmd b/KeywordSearch/release/solr/bin/autopsy-solr.cmd new file mode 100644 index 0000000000..5e95a94235 --- /dev/null +++ b/KeywordSearch/release/solr/bin/autopsy-solr.cmd @@ -0,0 +1,1508 @@ +@REM +@REM Licensed to the Apache Software Foundation (ASF) under one or more +@REM contributor license agreements. See the NOTICE file distributed with +@REM this work for additional information regarding copyright ownership. +@REM The ASF licenses this file to You under the Apache License, Version 2.0 +@REM (the "License"); you may not use this file except in compliance with +@REM the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. + + +IF "%OS%"=="Windows_NT" setlocal enabledelayedexpansion enableextensions + +set "PASS_TO_RUN_EXAMPLE=" + +REM Determine top-level Solr directory +set SDIR=%~dp0 +IF "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1% +set SOLR_TIP=%SDIR%\.. +pushd %SOLR_TIP% +set SOLR_TIP=%CD% +popd + + +REM Used to report errors before exiting the script +set SCRIPT_ERROR= +set NO_USER_PROMPT=0 + +REM Allow user to import vars from an include file +REM vars set in the include file can be overridden with +REM command line args +IF "%SOLR_INCLUDE%"=="" set "SOLR_INCLUDE=%SOLR_TIP%\bin\autopsy-solr.in.cmd" +IF EXIST "%SOLR_INCLUDE%" CALL "%SOLR_INCLUDE%" + +REM Select HTTP OR HTTPS related configurations +set SOLR_URL_SCHEME=http +set "SOLR_JETTY_CONFIG=--module=http" +set "SOLR_SSL_OPTS= " +IF DEFINED SOLR_SSL_KEY_STORE ( + set "SOLR_JETTY_CONFIG=--module=https" + set SOLR_URL_SCHEME=https + set "SCRIPT_ERROR=Solr server directory %SOLR_SERVER_DIR% not found!" + set "SOLR_SSL_OPTS=-Dsolr.jetty.keystore=%SOLR_SSL_KEY_STORE% -Dsolr.jetty.keystore.password=%SOLR_SSL_KEY_STORE_PASSWORD% -Dsolr.jetty.truststore=%SOLR_SSL_TRUST_STORE% -Dsolr.jetty.truststore.password=%SOLR_SSL_TRUST_STORE_PASSWORD% -Dsolr.jetty.ssl.needClientAuth=%SOLR_SSL_NEED_CLIENT_AUTH% -Dsolr.jetty.ssl.wantClientAuth=%SOLR_SSL_WANT_CLIENT_AUTH%" + IF DEFINED SOLR_SSL_CLIENT_KEY_STORE ( + set "SOLR_SSL_OPTS=%SOLR_SSL_OPTS% -Djavax.net.ssl.keyStore=%SOLR_SSL_CLIENT_KEY_STORE% -Djavax.net.ssl.keyStorePassword=%SOLR_SSL_CLIENT_KEY_STORE_PASSWORD% -Djavax.net.ssl.trustStore=%SOLR_SSL_CLIENT_TRUST_STORE% -Djavax.net.ssl.trustStorePassword=%SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD%" + ) ELSE ( + set "SOLR_SSL_OPTS=%SOLR_SSL_OPTS% -Djavax.net.ssl.keyStore=%SOLR_SSL_KEY_STORE% -Djavax.net.ssl.keyStorePassword=%SOLR_SSL_KEY_STORE_PASSWORD% -Djavax.net.ssl.trustStore=%SOLR_SSL_TRUST_STORE% -Djavax.net.ssl.trustStorePassword=%SOLR_SSL_TRUST_STORE_PASSWORD%" + ) +) ELSE ( + set SOLR_SSL_OPTS= +) + +REM Set the SOLR_TOOL_HOST variable for use when connecting to a running Solr instance +IF NOT "%SOLR_HOST%"=="" ( + set "SOLR_TOOL_HOST=%SOLR_HOST%" +) ELSE ( + set "SOLR_TOOL_HOST=localhost" +) + +REM Verify Java is available +IF DEFINED SOLR_JAVA_HOME set "JAVA_HOME=%SOLR_JAVA_HOME%" +REM Try to detect JAVA_HOME from the registry +IF NOT DEFINED JAVA_HOME ( + FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment" /v CurrentVersion') DO set CurVer=%%B + FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment\!CurVer!" /v JavaHome') DO ( + set "JAVA_HOME=%%B" + ) +) +IF NOT DEFINED JAVA_HOME goto need_java_home +set JAVA_HOME=%JAVA_HOME:"=% +IF %JAVA_HOME:~-1%==\ SET JAVA_HOME=%JAVA_HOME:~0,-1% +IF NOT EXIST "%JAVA_HOME%\bin\java.exe" ( + set "SCRIPT_ERROR=java.exe not found in %JAVA_HOME%\bin. Please set JAVA_HOME to a valid JRE / JDK directory." + goto err +) +set "JAVA=%JAVA_HOME%\bin\java" +CALL :resolve_java_info +IF !JAVA_MAJOR_VERSION! LSS 8 ( + set "SCRIPT_ERROR=Java 1.8 or later is required to run Solr. Current Java version is: !JAVA_VERSION_INFO!" + goto err +) + +set "DEFAULT_SERVER_DIR=%SOLR_TIP%\server" + +set FIRST_ARG=%1 + +IF [%1]==[] goto usage + +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="-h" goto usage +IF "%1"=="--help" goto usage +IF "%1"=="/?" goto usage +IF "%1"=="-i" goto get_info +IF "%1"=="-info" goto get_info +IF "%1"=="status" goto get_info +IF "%1"=="version" goto get_version +IF "%1"=="-v" goto get_version +IF "%1"=="-version" goto get_version + +REM Only allow the command to be the first argument, assume start if not supplied +IF "%1"=="start" goto set_script_cmd +IF "%1"=="stop" goto set_script_cmd +IF "%1"=="restart" goto set_script_cmd +IF "%1"=="healthcheck" ( + REM healthcheck uses different arg parsing strategy + set SCRIPT_CMD=healthcheck + SHIFT + goto parse_healthcheck_args +) +IF "%1"=="create" ( + set SCRIPT_CMD=create + SHIFT + goto parse_create_args +) +IF "%1"=="create_core" ( + set SCRIPT_CMD=create_core + SHIFT + goto parse_create_args +) +IF "%1"=="create_collection" ( + set SCRIPT_CMD=create_collection + SHIFT + goto parse_create_args +) +IF "%1"=="delete" ( + set SCRIPT_CMD=delete + SHIFT + goto parse_delete_args +) +IF "%1"=="zk" ( + set SCRIPT_CMD=zk + SHIFT + set ZK_RECURSE=false + goto parse_zk_args +) + +goto parse_args + +:usage +IF NOT "%SCRIPT_ERROR%"=="" ECHO %SCRIPT_ERROR% +IF [%FIRST_ARG%]==[] goto script_usage +IF "%FIRST_ARG%"=="-help" goto script_usage +IF "%FIRST_ARG%"=="-usage" goto script_usage +IF "%FIRST_ARG%"=="-h" goto script_usage +IF "%FIRST_ARG%"=="--help" goto script_usage +IF "%FIRST_ARG%"=="/?" goto script_usage +IF "%SCRIPT_CMD%"=="start" goto start_usage +IF "%SCRIPT_CMD%"=="restart" goto start_usage +IF "%SCRIPT_CMD%"=="stop" goto stop_usage +IF "%SCRIPT_CMD%"=="healthcheck" goto healthcheck_usage +IF "%SCRIPT_CMD%"=="create" goto create_usage +IF "%SCRIPT_CMD%"=="create_core" goto create_core_usage +IF "%SCRIPT_CMD%"=="create_collection" goto create_collection_usage +IF "%SCRIPT_CMD%"=="delete" goto delete_usage +IF "%SCRIPT_CMD%"=="zk" goto zk_usage +goto done + +:script_usage +@echo. +@echo Usage: solr COMMAND OPTIONS +@echo where COMMAND is one of: start, stop, restart, healthcheck, create, create_core, create_collection, delete, version, zk +@echo. +@echo Standalone server example (start Solr running in the background on port 8984): +@echo. +@echo solr start -p 8984 +@echo. +@echo SolrCloud example (start Solr running in SolrCloud mode using localhost:2181 to connect to Zookeeper, with 1g max heap size and remote Java debug options enabled): +@echo. +@echo solr start -c -m 1g -z localhost:2181 -a "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044" +@echo. +@echo Pass -help after any COMMAND to see command-specific usage information, +@echo such as: solr start -help or solr stop -help +@echo. +goto done + +:start_usage +@echo. +@echo Usage: solr %SCRIPT_CMD% [-f] [-c] [-h hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-a "additional-options"] [-V] +@echo. +@echo -f Start Solr in foreground; default starts Solr in the background +@echo and sends stdout / stderr to solr-PORT-console.log +@echo. +@echo -c or -cloud Start Solr in SolrCloud mode; if -z not supplied, an embedded Zookeeper +@echo instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983 +@echo. +@echo -h host Specify the hostname for this Solr instance +@echo. +@echo -p port Specify the port to start the Solr HTTP listener on; default is 8983 +@echo. +@echo -d dir Specify the Solr server directory; defaults to example +@echo. +@echo -z zkHost Zookeeper connection string; only used when running in SolrCloud mode using -c +@echo To launch an embedded Zookeeper instance, don't pass this parameter. +@echo. +@echo -m memory Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g +@echo results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m +@echo. +@echo -s dir Sets the solr.solr.home system property; Solr will create core directories under +@echo this directory. This allows you to run multiple Solr instances on the same host +@echo while reusing the same server directory set using the -d parameter. If set, the +@echo specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper. +@echo This parameter is ignored when running examples (-e), as the solr.solr.home depends +@echo on which example is run. The default value is server/solr. +@echo. +@echo -e example Name of the example to run; available examples: +@echo cloud: SolrCloud example +@echo techproducts: Comprehensive example illustrating many of Solr's core capabilities +@echo dih: Data Import Handler +@echo schemaless: Schema-less example +@echo. +@echo -a opts Additional parameters to pass to the JVM when starting Solr, such as to setup +@echo Java debug options. For example, to enable a Java debugger to attach to the Solr JVM +@echo you could pass: -a "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983" +@echo In most cases, you should wrap the additional parameters in double quotes. +@echo. +@echo -noprompt Don't prompt for input; accept all defaults when running examples that accept user input +@echo. +@echo -V Verbose messages from this script +@echo. +goto done + +:stop_usage +@echo. +@echo Usage: solr stop [-k key] [-p port] +@echo. +@echo -k key Stop key; default is solrrocks +@echo. +@echo -p port Specify the port the Solr HTTP listener is bound to +@echo. +@echo -all Find and stop all running Solr servers on this host +@echo. +goto done + +:healthcheck_usage +@echo. +@echo Usage: solr healthcheck [-c collection] [-z zkHost] +@echo. +@echo -c collection Collection to run healthcheck against. +@echo. +@echo -z zkHost Zookeeper connection string; default is localhost:9983 +@echo. +goto done + +:create_usage +echo. +echo Usage: solr create [-c name] [-d confdir] [-n confname] [-shards #] [-replicationFactor #] [-p port] +echo. +echo Create a core or collection depending on whether Solr is running in standalone (core) or SolrCloud +echo mode (collection). In other words, this action detects which mode Solr is running in, and then takes +echo the appropriate action (either create_core or create_collection). For detailed usage instructions, do: +echo. +echo bin\solr create_core -help +echo. +echo or +echo. +echo bin\solr create_collection -help +echo. +goto done + +:delete_usage +echo. +echo Usage: solr delete [-c name] [-deleteConfig boolean] [-p port] +echo. +echo Deletes a core or collection depending on whether Solr is running in standalone (core) or SolrCloud +echo mode (collection). If you're deleting a collection in SolrCloud mode, the default behavior is to also +echo delete the configuration directory from Zookeeper so long as it is not being used by another collection. +echo You can override this behavior by passing -deleteConfig false when running this command. +echo. +echo -c name Name of core to create +echo. +echo -deleteConfig boolean Delete the configuration directory from Zookeeper; default is true +echo. +echo -p port Port of a local Solr instance where you want to create the new core +echo If not specified, the script will search the local system for a running +echo Solr instance and will use the port of the first server it finds. +echo. +goto done + +:create_core_usage +echo. +echo Usage: solr create_core [-c name] [-d confdir] [-p port] +echo. +echo -c name Name of core to create +echo. +echo -d confdir Configuration directory to copy when creating the new core, built-in options are: +echo. +echo basic_configs: Minimal Solr configuration +echo data_driven_schema_configs: Managed schema with field-guessing support enabled +echo sample_techproducts_configs: Example configuration with many optional features enabled to +echo demonstrate the full power of Solr +echo. +echo If not specified, default is: data_driven_schema_configs +echo. +echo Alternatively, you can pass the path to your own configuration directory instead of using +echo one of the built-in configurations, such as: bin\solr create_core -c mycore -d c:/tmp/myconfig +echo. +echo -p port Port of a local Solr instance where you want to create the new core +echo If not specified, the script will search the local system for a running +echo Solr instance and will use the port of the first server it finds. +echo. +goto done + +:create_collection_usage +echo. +echo Usage: solr create_collection [-c name] [-d confdir] [-n confname] [-shards #] [-replicationFactor #] [-p port] +echo. +echo -c name Name of collection to create +echo. +echo -d confdir Configuration directory to copy when creating the new collection, built-in options are: +echo. +echo basic_configs: Minimal Solr configuration +echo data_driven_schema_configs: Managed schema with field-guessing support enabled +echo sample_techproducts_configs: Example configuration with many optional features enabled to +echo demonstrate the full power of Solr +echo. +echo If not specified, default is: data_driven_schema_configs +echo. +echo Alternatively, you can pass the path to your own configuration directory instead of using +echo one of the built-in configurations, such as: bin\solr create_collection -c mycoll -d c:/tmp/myconfig +echo. +echo By default the script will upload the specified confdir directory into Zookeeper using the same +echo name as the collection (-c) option. Alternatively, if you want to reuse an existing directory +echo or create a confdir in Zookeeper that can be shared by multiple collections, use the -n option +echo. +echo -n configName Name the configuration directory in Zookeeper; by default, the configuration +echo will be uploaded to Zookeeper using the collection name (-c), but if you want +echo to use an existing directory or override the name of the configuration in +echo Zookeeper, then use the -c option. +echo. +echo -shards # Number of shards to split the collection into +echo. +echo -replicationFactor # Number of copies of each document in the collection +echo. +echo -p port Port of a local Solr instance where you want to create the new collection +echo If not specified, the script will search the local system for a running +echo Solr instance and will use the port of the first server it finds. +echo. +goto done + +:zk_usage +set ZK_FULL=true +goto zk_short_usage +:zk_full_usage +echo Be sure to check the Solr logs in case of errors. +echo. +echo -z zkHost Optional Zookeeper connection string for all commands. If specified it +echo overrides the 'ZK_HOST=...'' defined in solr.in.sh. +echo. +echo upconfig uploads a configset from the local machine to Zookeeper. (Backcompat: -upconfig) +echo. +echo downconfig downloads a configset from Zookeeper to the local machine. (Backcompat: -downconfig) +echo. +echo -n configName Name of the configset in Zookeeper that will be the destination of +echo 'upconfig' and the source for 'downconfig'. +echo. +echo -d confdir The local directory the configuration will be uploaded from for +echo 'upconfig' or downloaded to for 'downconfig'. If 'confdir' is a child of +echo ...solr/server/solr/configsets' then the configs will be copied from/to +echo that directory. Otherwise it is interpreted as a simple local path. +echo. +echo cp copies files or folders to/from Zookeeper or Zokeeper -^> Zookeeper +echo -r Recursively copy ^ to ^. Command will fail if ^ has children and +echo -r is not specified. Optional +echo. +echo. ^, ^ : [file:][/]path/to/local/file or zk:/path/to/zk/node +echo NOTE: ^ and ^ may both be Zookeeper resources prefixed by 'zk:' +echo When ^ is a zk resource, ^ may be '.' +echo If ^ ends with '/', then ^ will be a local folder or parent znode and the last +echo element of the ^ path will be appended. +echo. +echo The 'file:' prefix is stripped, thus 'file:/' specifies an absolute local path and +echo 'file:somewhere' specifies a relative local path. All paths on Zookeeper are absolute +echo so the slash is required. +echo. +echo Zookeeper nodes CAN have data, so moving a single file to a parent znode +echo will overlay the data on the parent Znode so specifying the trailing slash +echo is important. +echo. +echo Wildcards are not supported +echo. +echo rm deletes files or folders on Zookeeper +echo -r Recursively delete if ^ is a directory. Command will fail if ^ +echo has children and -r is not specified. Optional +echo ^ : [zk:]/path/to/zk/node. ^ may not be the root ('/')" +echo. +echo mv moves (renames) znodes on Zookeeper +echo ^, ^ : Zookeeper nodes, the 'zk:' prefix is optional. +echo If ^ ends with '/', then ^ will be a parent znode +echo and the last element of the ^ path will be appended. +echo Zookeeper nodes CAN have data, so moving a single file to a parent znode +echo will overlay the data on the parent Znode so specifying the trailing slash +echo is important. +echo. +echo ls lists the znodes on Zookeeper +echo -r recursively descends the path listing all znodes. Optional +echo ^: The Zookeeper path to use as the root. +echo. +echo Only the node names are listed, not data +echo. +goto done + +:zk_short_usage +IF NOT "!ERROR_MSG!"=="" ( + echo ERROR: !ERROR_MSG! + echo. +) +echo Usage: solr zk upconfig^|downconfig -d ^ -n ^ [-z zkHost] +echo solr zk cp [-r] ^ ^ [-z zkHost] +echo solr zk rm [-r] ^ [-z zkHost] +echo solr zk mv ^ ^ [-z zkHost] +echo solr zk ls [-r] ^ [-z zkHost] +echo. +IF "%ZK_FULL%"=="true" ( + goto zk_full_usage +) ELSE ( + echo Type bin/solr zk -help for full usage help +) +goto done + + +REM Really basic command-line arg parsing +:parse_args + +set "arg=%~1" +set "firstTwo=%arg:~0,2%" +IF "%SCRIPT_CMD%"=="" set SCRIPT_CMD=start +IF [%1]==[] goto process_script_cmd +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +IF "%1"=="-f" goto set_foreground_mode +IF "%1"=="-foreground" goto set_foreground_mode +IF "%1"=="-V" goto set_verbose +IF "%1"=="-verbose" goto set_verbose +IF "%1"=="-c" goto set_cloud_mode +IF "%1"=="-cloud" goto set_cloud_mode +IF "%1"=="-d" goto set_server_dir +IF "%1"=="-dir" goto set_server_dir +IF "%1"=="-s" goto set_solr_home_dir +IF "%1"=="-solr.home" goto set_solr_home_dir +IF "%1"=="-e" goto set_example +IF "%1"=="-example" goto set_example +IF "%1"=="-h" goto set_host +IF "%1"=="-host" goto set_host +IF "%1"=="-m" goto set_memory +IF "%1"=="-memory" goto set_memory +IF "%1"=="-p" goto set_port +IF "%1"=="-port" goto set_port +IF "%1"=="-z" goto set_zookeeper +IF "%1"=="-zkhost" goto set_zookeeper +IF "%1"=="-a" goto set_addl_opts +IF "%1"=="-addlopts" goto set_addl_opts +IF "%1"=="-noprompt" goto set_noprompt +IF "%1"=="-k" goto set_stop_key +IF "%1"=="-key" goto set_stop_key +IF "%1"=="-all" goto set_stop_all +IF "%firstTwo%"=="-D" goto set_passthru +IF NOT "%1"=="" goto invalid_cmd_line +goto invalid_cmd_line + +:set_script_cmd +set SCRIPT_CMD=%1 +SHIFT +goto parse_args + +:set_foreground_mode +set FG=1 +SHIFT +goto parse_args + +:set_verbose +set verbose=1 +set "PASS_TO_RUN_EXAMPLE=--verbose !PASS_TO_RUN_EXAMPLE!" +SHIFT +goto parse_args + +:set_cloud_mode +set SOLR_MODE=solrcloud +SHIFT +goto parse_args + +:set_server_dir + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Directory name is required! + goto invalid_cmd_line +) +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected directory but found %2 instead! + goto invalid_cmd_line +) + +REM See if they are using a short-hand name relative from the Solr tip directory +IF EXIST "%SOLR_TIP%\%~2" ( + set "SOLR_SERVER_DIR=%SOLR_TIP%\%~2" +) ELSE ( + set "SOLR_SERVER_DIR=%~2" +) +SHIFT +SHIFT +goto parse_args + +:set_solr_home_dir + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Directory name is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected directory but found %2 instead! + goto invalid_cmd_line +) +set "SOLR_HOME=%~2" +SHIFT +SHIFT +goto parse_args + +:set_example + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Example name is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected example name but found %2 instead! + goto invalid_cmd_line +) + +set EXAMPLE=%~2 +SHIFT +SHIFT +goto parse_args + +:set_memory + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Memory setting is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected memory setting but found %2 instead! + goto invalid_cmd_line +) + +set SOLR_HEAP=%~2 +set "PASS_TO_RUN_EXAMPLE=-m %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_host +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Hostname is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected hostname but found %2 instead! + goto invalid_cmd_line +) + +set SOLR_HOST=%~2 +set "PASS_TO_RUN_EXAMPLE=-h %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_port +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Port is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected port but found %2 instead! + goto invalid_cmd_line +) + +set SOLR_PORT=%~2 +set "PASS_TO_RUN_EXAMPLE=-p %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_stop_key +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Stop key is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected stop key but found %2 instead! + goto invalid_cmd_line +) +set STOP_KEY=%~2 +SHIFT +SHIFT +goto parse_args + +:set_stop_all +set STOP_ALL=1 +SHIFT +goto parse_args + +:set_zookeeper + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Zookeeper connection string is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected Zookeeper connection string but found %2 instead! + goto invalid_cmd_line +) + +set "ZK_HOST=%~2" +set "PASS_TO_RUN_EXAMPLE=-z %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_addl_opts +set "arg=%~2" +set "SOLR_ADDL_ARGS=%~2" +SHIFT +SHIFT +goto parse_args + +:set_passthru +set "PASSTHRU=%~1=%~2" +IF NOT "%SOLR_OPTS%"=="" ( + set "SOLR_OPTS=%SOLR_OPTS% %PASSTHRU%" +) ELSE ( + set "SOLR_OPTS=%PASSTHRU%" +) +set "PASS_TO_RUN_EXAMPLE=%PASSTHRU% !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_noprompt +set NO_USER_PROMPT=1 +set "PASS_TO_RUN_EXAMPLE=-noprompt !PASS_TO_RUN_EXAMPLE!" + +SHIFT +goto parse_args + +REM Perform the requested command after processing args +:process_script_cmd + +IF "%verbose%"=="1" ( + CALL :safe_echo "Using Solr root directory: %SOLR_TIP%" + CALL :safe_echo "Using Java: %JAVA%" + "%JAVA%" -version + @echo. +) + +IF NOT "%SOLR_HOST%"=="" ( + set SOLR_HOST_ARG=-Dhost=%SOLR_HOST% +) ELSE ( + set SOLR_HOST_ARG= +) + +IF "%SOLR_SERVER_DIR%"=="" set "SOLR_SERVER_DIR=%DEFAULT_SERVER_DIR%" + +IF NOT EXIST "%SOLR_SERVER_DIR%" ( + set "SCRIPT_ERROR=Solr server directory %SOLR_SERVER_DIR% not found!" + goto err +) + +IF NOT "%EXAMPLE%"=="" goto run_example + +:start_solr +IF "%SOLR_HOME%"=="" set "SOLR_HOME=%SOLR_SERVER_DIR%\solr" +IF EXIST "%cd%\%SOLR_HOME%" set "SOLR_HOME=%cd%\%SOLR_HOME%" + +IF NOT EXIST "%SOLR_HOME%\" ( + IF EXIST "%SOLR_SERVER_DIR%\%SOLR_HOME%" ( + set "SOLR_HOME=%SOLR_SERVER_DIR%\%SOLR_HOME%" + ) ELSE ( + set "SCRIPT_ERROR=Solr home directory %SOLR_HOME% not found!" + goto err + ) +) + +IF "%STOP_KEY%"=="" set STOP_KEY=solrrocks + +@REM This is quite hacky, but examples rely on a different log4j.properties +@REM so that we can write logs for examples to %SOLR_HOME%\..\logs +@REM set "SOLR_LOGS_DIR=%SOLR_SERVER_DIR%\logs" +@REM set "EXAMPLE_DIR=%SOLR_TIP%\example" +@REM set TMP=!SOLR_HOME:%EXAMPLE_DIR%=! +@REM IF NOT "%TMP%"=="%SOLR_HOME%" ( +@REM set "SOLR_LOGS_DIR=%SOLR_HOME%\..\logs" +@REM set "LOG4J_CONFIG=file:%EXAMPLE_DIR%\resources\log4j.properties" +@REM ) + +set "SOLR_LOGS_DIR=%APPDATA%\autopsy\var\log\solr" + +set IS_RESTART=0 +IF "%SCRIPT_CMD%"=="restart" ( + IF "%SOLR_PORT%"=="" ( + set "SCRIPT_ERROR=Must specify the port when trying to restart Solr." + goto err + ) + set SCRIPT_CMD=stop + set IS_RESTART=1 +) + +@REM stop logic here +IF "%SCRIPT_CMD%"=="stop" ( + IF "%SOLR_PORT%"=="" ( + IF "%STOP_ALL%"=="1" ( + set found_it=0 + for /f "usebackq" %%i in (`dir /b "%SOLR_LOGS_DIR%" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + @REM j is the ip:port and k is the pid + IF NOT "%%k"=="0" ( + IF "%%j"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" ( + set found_it=1 + @echo Stopping Solr process %%k running on port !SOME_SOLR_PORT! + set /A STOP_PORT=!SOME_SOLR_PORT! - 1000 + "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop + del "%SOLR_LOGS_DIR%"\solr-!SOME_SOLR_PORT!.port + timeout /T 5 + REM Kill it if it is still running after the graceful shutdown + For /f "tokens=2,5" %%M in ('netstat -nao ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF "%%N"=="%%k" ( + IF "%%M"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" ( + @echo Forcefully killing process %%N + taskkill /f /PID %%N + ) + ) + ) + ) + ) + ) + ) + ) + if "!found_it!"=="0" echo No Solr nodes found to stop. + ) ELSE ( + set "SCRIPT_ERROR=Must specify the port when trying to stop Solr, or use -all to stop all running nodes on this host." + goto err + ) + ) ELSE ( + set found_it=0 + For /f "tokens=2,5" %%M in ('netstat -nao ^| find "TCP " ^| find ":0 " ^| find ":%SOLR_PORT% "') do ( + IF NOT "%%N"=="0" ( + IF "%%M"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" ( + set found_it=1 + @echo Stopping Solr process %%N running on port %SOLR_PORT% + set /A STOP_PORT=%SOLR_PORT% - 1000 + "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" "%SOLR_JETTY_CONFIG%" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop + del "%SOLR_LOGS_DIR%"\solr-%SOLR_PORT%.port + timeout /T 5 + REM Kill it if it is still running after the graceful shutdown + For /f "tokens=2,5" %%j in ('netstat -nao ^| find "TCP " ^| find ":0 " ^| find ":%SOLR_PORT% "') do ( + IF "%%N"=="%%k" ( + IF "%%j"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" ( + @echo Forcefully killing process %%N + taskkill /f /PID %%N + ) + ) + ) + ) + ) + ) + if "!found_it!"=="0" echo No Solr found running on port %SOLR_PORT% + ) + + IF "!IS_RESTART!"=="0" goto done +) + +IF "!IS_RESTART!"=="1" set SCRIPT_CMD=start + +IF "%SOLR_PORT%"=="" set SOLR_PORT=8983 +IF "%STOP_PORT%"=="" set /A STOP_PORT=%SOLR_PORT% - 1000 + +IF "%SCRIPT_CMD%"=="start" ( + REM see if Solr is already running using netstat + For /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":%SOLR_PORT% "') do ( + IF NOT "%%k"=="0" ( + IF "%%j"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" ( + set "SCRIPT_ERROR=Process %%k is already listening on port %SOLR_PORT%. If this is Solr, please stop it first before starting (or use restart). If this is not Solr, then please choose a different port using -p PORT" + goto err + ) + ) + ) +) + +@REM determine if -server flag is supported by current JVM +"%JAVA%" -server -version > nul 2>&1 +IF ERRORLEVEL 1 ( + set IS_JDK=false + set "SERVEROPT=" + @echo WARNING: You are using a JRE without support for -server option. Please upgrade to latest JDK for best performance + @echo. +) ELSE ( + set IS_JDK=true + set "SERVEROPT=-server" +) +"%JAVA%" -d64 -version > nul 2>&1 +IF ERRORLEVEL 1 ( + set "IS_64BIT=false" + @echo WARNING: 32-bit Java detected. Not recommended for production. Point your JAVA_HOME to a 64-bit JDK + @echo. +) ELSE ( + set IS_64bit=true +) + +REM backup log files (use current timestamp for backup name) +For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) +For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b) +set now_ts=!mydate!_!mytime! +IF EXIST "!SOLR_LOGS_DIR!\solr.log" ( + echo Backing up !SOLR_LOGS_DIR!\solr.log + move /Y "!SOLR_LOGS_DIR!\solr.log" "!SOLR_LOGS_DIR!\solr_log_!now_ts!" +) + +IF EXIST "!SOLR_LOGS_DIR!\solr_gc.log" ( + echo Backing up !SOLR_LOGS_DIR!\solr_gc.log + move /Y "!SOLR_LOGS_DIR!\solr_gc.log" "!SOLR_LOGS_DIR!\solr_gc_log_!now_ts!" +) + +IF NOT "%ZK_HOST%"=="" set SOLR_MODE=solrcloud + +IF "%SOLR_MODE%"=="solrcloud" ( + IF "%ZK_CLIENT_TIMEOUT%"=="" set "ZK_CLIENT_TIMEOUT=15000" + + set "CLOUD_MODE_OPTS=-DzkClientTimeout=!ZK_CLIENT_TIMEOUT!" + + IF NOT "%ZK_HOST%"=="" ( + set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -DzkHost=%ZK_HOST%" + ) ELSE ( + IF "%verbose%"=="1" echo Configuring SolrCloud to launch an embedded Zookeeper using -DzkRun + set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -DzkRun" + ) + IF EXIST "%SOLR_HOME%\collection1\core.properties" set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DnumShards=1" +) ELSE ( + set CLOUD_MODE_OPTS= + IF NOT EXIST "%SOLR_HOME%\solr.xml" ( + set "SCRIPT_ERROR=Solr home directory %SOLR_HOME% must contain solr.xml!" + goto err + ) +) + +REM These are useful for attaching remove profilers like VisualVM/JConsole +IF "%ENABLE_REMOTE_JMX_OPTS%"=="true" ( + IF "!RMI_PORT!"=="" set RMI_PORT=1%SOLR_PORT% + set REMOTE_JMX_OPTS=-Dcom.sun.management.jmxremote ^ +-Dcom.sun.management.jmxremote.local.only=false ^ +-Dcom.sun.management.jmxremote.ssl=false ^ +-Dcom.sun.management.jmxremote.authenticate=false ^ +-Dcom.sun.management.jmxremote.port=!RMI_PORT! ^ +-Dcom.sun.management.jmxremote.rmi.port=!RMI_PORT! + + IF NOT "%SOLR_HOST%"=="" set REMOTE_JMX_OPTS=%REMOTE_JMX_OPTS% -Djava.rmi.server.hostname=%SOLR_HOST% +) ELSE ( + set REMOTE_JMX_OPTS= +) + +IF NOT "%SOLR_HEAP%"=="" set SOLR_JAVA_MEM=-Xms%SOLR_HEAP% -Xmx%SOLR_HEAP% +IF "%SOLR_JAVA_MEM%"=="" set SOLR_JAVA_MEM=-Xms512m -Xmx512m +IF "%SOLR_TIMEZONE%"=="" set SOLR_TIMEZONE=UTC + +IF "!JAVA_MAJOR_VERSION!"=="7" ( + set "GC_TUNE=%GC_TUNE% -XX:CMSFullGCsBeforeCompaction=1 -XX:CMSTriggerPermRatio=80" + IF !JAVA_BUILD! GEQ 40 ( + IF !JAVA_BUILD! LEQ 51 ( + set "GC_TUNE=!GC_TUNE! -XX:-UseSuperWord" + @echo WARNING: Java version !JAVA_VERSION_INFO! has known bugs with Lucene and requires the -XX:-UseSuperWord flag. Please consider upgrading your JVM. + ) + ) +) + +IF "%verbose%"=="1" ( + @echo Starting Solr using the following settings: + CALL :safe_echo " JAVA = %JAVA%" + CALL :safe_echo " SOLR_SERVER_DIR = %SOLR_SERVER_DIR%" + CALL :safe_echo " SOLR_HOME = %SOLR_HOME%" + @echo SOLR_HOST = %SOLR_HOST% + @echo SOLR_PORT = %SOLR_PORT% + @echo STOP_PORT = %STOP_PORT% + @echo SOLR_JAVA_MEM = %SOLR_JAVA_MEM% + @echo GC_TUNE = !GC_TUNE! + @echo GC_LOG_OPTS = %GC_LOG_OPTS% + @echo SOLR_TIMEZONE = %SOLR_TIMEZONE% + + IF "%SOLR_MODE%"=="solrcloud" ( + @echo CLOUD_MODE_OPTS = %CLOUD_MODE_OPTS% + ) + + IF NOT "%SOLR_OPTS%"=="" ( + @echo SOLR_OPTS = %SOLR_OPTS% + ) + + IF NOT "%SOLR_ADDL_ARGS%"=="" ( + CALL :safe_echo " SOLR_ADDL_ARGS = %SOLR_ADDL_ARGS%" + ) + + IF "%ENABLE_REMOTE_JMX_OPTS%"=="true" ( + @echo RMI_PORT = !RMI_PORT! + @echo REMOTE_JMX_OPTS = %REMOTE_JMX_OPTS% + ) + + @echo. +) + +set START_OPTS=-Duser.timezone=%SOLR_TIMEZONE% +set START_OPTS=%START_OPTS% !GC_TUNE! %GC_LOG_OPTS% +IF NOT "!CLOUD_MODE_OPTS!"=="" set "START_OPTS=%START_OPTS% !CLOUD_MODE_OPTS!" +IF NOT "%REMOTE_JMX_OPTS%"=="" set "START_OPTS=%START_OPTS% %REMOTE_JMX_OPTS%" +IF NOT "%SOLR_ADDL_ARGS%"=="" set "START_OPTS=%START_OPTS% %SOLR_ADDL_ARGS%" +IF NOT "%SOLR_HOST_ARG%"=="" set "START_OPTS=%START_OPTS% %SOLR_HOST_ARG%" +IF NOT "%SOLR_OPTS%"=="" set "START_OPTS=%START_OPTS% %SOLR_OPTS%" +IF NOT "%SOLR_SSL_OPTS%"=="" ( + set "SSL_PORT_PROP=-Dsolr.jetty.https.port=%SOLR_PORT%" + set "START_OPTS=%START_OPTS% %SOLR_SSL_OPTS% !SSL_PORT_PROP!" +) + +IF NOT DEFINED LOG4J_CONFIG set "LOG4J_CONFIG=file:%SOLR_SERVER_DIR%\resources\log4j.properties" + +cd /d "%SOLR_SERVER_DIR%" + +IF NOT EXIST "!SOLR_LOGS_DIR!" ( + mkdir "!SOLR_LOGS_DIR!" +) + +IF NOT EXIST "%SOLR_LOGS_DIR%\tmp" ( + mkdir "%SOLR_LOGS_DIR%\tmp" +) + +IF "%JAVA_VENDOR%" == "IBM J9" ( + set "GCLOG_OPT=-Xverbosegclog" +) else ( + set "GCLOG_OPT=-Xloggc" +) + +IF "%FG%"=="1" ( + REM run solr in the foreground + title "Solr-%SOLR_PORT%" + echo %SOLR_PORT%>"%SOLR_LOGS_DIR%"\solr-%SOLR_PORT%.port + "%JAVA%" %SERVEROPT% %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ + -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_LOGS_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" +) ELSE ( + START /B "Solr-%SOLR_PORT%" /D "%SOLR_SERVER_DIR%" "%JAVA%" %SERVEROPT% %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ + -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_LOGS_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" > "!SOLR_LOGS_DIR!\solr-%SOLR_PORT%-console.log" + echo %SOLR_PORT%>"%SOLR_LOGS_DIR%"\solr-%SOLR_PORT%.port + + REM now wait to see Solr come online ... + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI status -maxWaitSecs 30 -solr !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:%SOLR_PORT%/solr +) + +goto done + +:run_example +REM Run the requested example + +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI run_example -script "%SDIR%\solr.cmd" -e %EXAMPLE% -d "%SOLR_SERVER_DIR%" -urlScheme !SOLR_URL_SCHEME! !PASS_TO_RUN_EXAMPLE! + +REM End of run_example +goto done + +:get_info +REM Find all Java processes, correlate with those listening on a port +REM and then try to contact via that port using the status tool +for /f "usebackq" %%i in (`dir /b "%SOLR_LOGS_DIR%" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "Delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF NOT "%%k"=="0" ( + if "%%j"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" ( + @echo. + set has_info=1 + echo Found Solr process %%k running on port !SOME_SOLR_PORT! + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI status -solr !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!SOME_SOLR_PORT!/solr + @echo. + ) + ) + ) + ) +) +if NOT "!has_info!"=="1" echo No running Solr nodes found. +set has_info= +goto done + +:parse_healthcheck_args +IF [%1]==[] goto run_healthcheck +IF "%1"=="-c" goto set_healthcheck_collection +IF "%1"=="-collection" goto set_healthcheck_collection +IF "%1"=="-z" goto set_healthcheck_zk +IF "%1"=="-zkhost" goto set_healthcheck_zk +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +goto run_healthcheck + +:set_healthcheck_collection +set HEALTHCHECK_COLLECTION=%~2 +SHIFT +SHIFT +goto parse_healthcheck_args + +:set_healthcheck_zk +set HEALTHCHECK_ZK_HOST=%~2 +SHIFT +SHIFT +goto parse_healthcheck_args + +:run_healthcheck +IF NOT DEFINED HEALTHCHECK_COLLECTION goto healthcheck_usage +IF NOT DEFINED HEALTHCHECK_ZK_HOST set "HEALTHCHECK_ZK_HOST=localhost:9983" +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI healthcheck -collection !HEALTHCHECK_COLLECTION! -zkHost !HEALTHCHECK_ZK_HOST! +goto done + +:get_version +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI version +goto done + +:parse_create_args +IF [%1]==[] goto run_create +IF "%1"=="-c" goto set_create_name +IF "%1"=="-core" goto set_create_name +IF "%1"=="-collection" goto set_create_name +IF "%1"=="-d" goto set_create_confdir +IF "%1"=="-confdir" goto set_create_confdir +IF "%1"=="-n" goto set_create_confname +IF "%1"=="-confname" goto set_create_confname +IF "%1"=="-s" goto set_create_shards +IF "%1"=="-shards" goto set_create_shards +IF "%1"=="-rf" goto set_create_rf +IF "%1"=="-replicationFactor" goto set_create_rf +IF "%1"=="-p" goto set_create_port +IF "%1"=="-port" goto set_create_port +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +goto run_create + +:set_create_name +set CREATE_NAME=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_confdir +set CREATE_CONFDIR=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_confname +set CREATE_CONFNAME=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_port +set CREATE_PORT=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_shards +set CREATE_NUM_SHARDS=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_rf +set CREATE_REPFACT=%~2 +SHIFT +SHIFT +goto parse_create_args + +:run_create +IF "!CREATE_NAME!"=="" ( + set "SCRIPT_ERROR=Name (-c) is a required parameter for %SCRIPT_CMD%" + goto invalid_cmd_line +) +IF "!CREATE_CONFDIR!"=="" set CREATE_CONFDIR=data_driven_schema_configs +IF "!CREATE_NUM_SHARDS!"=="" set CREATE_NUM_SHARDS=1 +IF "!CREATE_REPFACT!"=="" set CREATE_REPFACT=1 +IF "!CREATE_CONFNAME!"=="" set CREATE_CONFNAME=!CREATE_NAME! + +REM Find a port that Solr is running on +if "!CREATE_PORT!"=="" ( + for /f "usebackq" %%i in (`dir /b "%SOLR_LOGS_DIR%" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "Delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF NOT "%%k"=="0" set CREATE_PORT=!SOME_SOLR_PORT! + ) + ) + ) +) +if "!CREATE_PORT!"=="" ( + set "SCRIPT_ERROR=Could not find a running Solr instance on this host! Please use the -p option to specify the port." + goto err +) + +if "%SCRIPT_CMD%"=="create_core" ( + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI create_core -name !CREATE_NAME! -solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!CREATE_PORT!/solr ^ + -confdir !CREATE_CONFDIR! -configsetsDir "%SOLR_TIP%\server\solr\configsets" +) else ( + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI create -name !CREATE_NAME! -shards !CREATE_NUM_SHARDS! -replicationFactor !CREATE_REPFACT! ^ + -confname !CREATE_CONFNAME! -confdir !CREATE_CONFDIR! -configsetsDir "%SOLR_TIP%\server\solr\configsets" -solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!CREATE_PORT!/solr +) + +goto done + +:parse_delete_args +IF [%1]==[] goto run_delete +IF "%1"=="-c" goto set_delete_name +IF "%1"=="-core" goto set_delete_name +IF "%1"=="-collection" goto set_delete_name +IF "%1"=="-p" goto set_delete_port +IF "%1"=="-port" goto set_delete_port +IF "%1"=="-deleteConfig" goto set_delete_config +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +goto run_delete + +:set_delete_name +set DELETE_NAME=%~2 +SHIFT +SHIFT +goto parse_delete_args + +:set_delete_port +set DELETE_PORT=%~2 +SHIFT +SHIFT +goto parse_delete_args + +:set_delete_config +set DELETE_CONFIG=%~2 +SHIFT +SHIFT +goto parse_delete_args + +:run_delete +IF "!DELETE_NAME!"=="" ( + set "SCRIPT_ERROR=Name (-c) is a required parameter for %SCRIPT_CMD%" + goto invalid_cmd_line +) + +REM Find a port that Solr is running on +if "!DELETE_PORT!"=="" ( + for /f "usebackq" %%i in (`dir /b "%SOLR_LOGS_DIR%" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "Delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF NOT "%%k"=="0" set DELETE_PORT=!SOME_SOLR_PORT! + ) + ) + ) +) +if "!DELETE_PORT!"=="" ( + set "SCRIPT_ERROR=Could not find a running Solr instance on this host! Please use the -p option to specify the port." + goto err +) + +if "!DELETE_CONFIG!"=="" ( + set DELETE_CONFIG=true +) + +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ +-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ +org.apache.solr.util.SolrCLI delete -name !DELETE_NAME! -deleteConfig !DELETE_CONFIG! ^ +-solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!DELETE_PORT!/solr + +goto done + +REM Clumsy to do the state machine thing for -d and -n, but that's required for back-compat +:parse_zk_args +IF "%1"=="-upconfig" ( + goto set_zk_op +) ELSE IF "%1"=="upconfig" ( + goto set_zk_op +) ELSE IF "%1"=="-downconfig" ( + goto set_zk_op +) ELSE IF "%1"=="downconfig" ( + goto set_zk_op +) ELSE IF "%1"=="cp" ( + goto set_zk_op +) ELSE IF "%1"=="mv" ( + goto set_zk_op +) ELSE IF "%1"=="rm" ( + goto set_zk_op +) ELSE IF "%1"=="ls" ( + goto set_zk_op +) ELSE IF "%1"=="-n" ( + goto set_config_name +) ELSE IF "%1"=="-r" ( + goto set_zk_recurse +) ELSE IF "%1"=="-configname" ( + goto set_config_name +) ELSE IF "%1"=="-d" ( + goto set_configdir +) ELSE IF "%1"=="-confdir" ( + goto set_configdir +) ELSE IF "%1"=="-z" ( + goto set_config_zk +) ELSE IF "%1"=="/?" ( + goto zk_usage +) ELSE IF "%1"=="-h" ( + goto zk_usage +) ELSE IF "%1"=="-help" ( + goto zk_usage +) ELSE IF "!ZK_SRC!"=="" ( + if not "%~1"=="" ( + goto set_zk_src + ) + goto zk_usage +) ELSE IF "!ZK_DST!"=="" ( + IF "%ZK_OP%"=="cp" ( + goto set_zk_dst + ) + IF "%ZK_OP%"=="mv" ( + goto set_zk_dst + ) + set ZK_DST="_" +) ELSE IF NOT "%1"=="" ( + set ERROR_MSG="Unrecognized or misplaced zk argument %1%" + goto zk_short_usage +) +goto run_zk + +:set_zk_op +set ZK_OP=%~1 +SHIFT +goto parse_zk_args + +:set_config_name +set CONFIGSET_NAME=%~2 +SHIFT +SHIFT +goto parse_zk_args + +:set_configdir +set CONFIGSET_DIR=%~2 +SHIFT +SHIFT +goto parse_zk_args + +:set_config_zk +set ZK_HOST=%~2 +SHIFT +SHIFT +goto parse_zk_args + +:set_zk_src +set ZK_SRC=%~1 +SHIFT +goto parse_zk_args + +:set_zk_dst +set ZK_DST=%~1 +SHIFT +goto parse_zk_args + +:set_zk_recurse +set ZK_RECURSE="true" +SHIFT +goto parse_zk_args + +:run_zk +IF "!ZK_OP!"=="" ( + set "ERROR_MSG=Invalid command specified for zk sub-command" + goto zk_short_usage +) + +IF "!ZK_HOST!"=="" ( + set "ERROR_MSG=Must specify -z zkHost" + goto zk_short_usage +) + +IF "!ZK_OP!"=="-upconfig" ( + set ZK_OP="upconfig" +) +IF "!ZK_OP!"=="-downconfig" ( + set ZK_OP="downconfig" +) + +IF "!ZK_OP!"=="upconfig" ( + IF "!CONFIGSET_NAME!"=="" ( + set ERROR_MSG="-n option must be set for upconfig" + goto zk_short_usage + ) + IF "!CONFIGSET_DIR!"=="" ( + set ERROR_MSG="The -d option must be set for upconfig." + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -confname !CONFIGSET_NAME! -confdir !CONFIGSET_DIR! -zkHost !ZK_HOST! -configsetsDir "%SOLR_TIP%/server/solr/configsets" +) ELSE IF "!ZK_OP!"=="downconfig" ( + IF "!CONFIGSET_NAME!"=="" ( + set ERROR_MSG="-n option must be set for downconfig" + goto zk_short_usage + ) + IF "!CONFIGSET_DIR!"=="" ( + set ERROR_MSG="The -d option must be set for downconfig." + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -confname !CONFIGSET_NAME! -confdir !CONFIGSET_DIR! -zkHost !ZK_HOST! +) ELSE IF "!ZK_OP!"=="cp" ( + IF "%ZK_SRC%"=="" ( + set ERROR_MSG=" must be specified for 'cp' command" + goto zk_short_usage + ) + IF "%ZK_DST%"=="" ( + set ERROR_MSG= must be specified for 'cp' command" + goto zk_short_usage + ) + IF NOT "!ZK_SRC:~0,3!"=="zk:" ( + IF NOT "!%ZK_DST:~0,3!"=="zk:" ( + set ERROR_MSG="At least one of src or dst must be prefixed by 'zk:'" + goto zk_short_usage + ) + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -src !ZK_SRC! -dst !ZK_DST! -recurse !ZK_RECURSE! +) ELSE IF "!ZK_OP!"=="mv" ( + IF "%ZK_SRC%"=="" ( + set ERROR_MSG=" must be specified for 'mv' command" + goto zk_short_usage + ) + IF "%ZK_DST%"=="" ( + set ERROR_MSG=" must be specified for 'mv' command" + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -src !ZK_SRC! -dst !ZK_DST! +) ELSE IF "!ZK_OP!"=="rm" ( + IF "%ZK_SRC"=="" ( + set ERROR_MSG="Zookeeper path to remove must be specified when using the 'rm' command" + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -path !ZK_SRC! -recurse !ZK_RECURSE! +) ELSE IF "!ZK_OP!"=="ls" ( + IF "%ZK_SRC"=="" ( + set ERROR_MSG="Zookeeper path to remove must be specified when using the 'rm' command" + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -path !ZK_SRC! -recurse !ZK_RECURSE! +) ELSE ( + set ERROR_MSG="Unknown zk option !ZK_OP!" + goto zk_short_usage +) +goto done + +:invalid_cmd_line +@echo. +IF "!SCRIPT_ERROR!"=="" ( + @echo Invalid command-line option: %1 +) ELSE ( + @echo ERROR: !SCRIPT_ERROR! +) +@echo. +IF "%FIRST_ARG%"=="start" ( + goto start_usage +) ELSE IF "%FIRST_ARG:~0,1%" == "-" ( + goto start_usage +) ELSE IF "%FIRST_ARG%"=="restart" ( + goto start_usage +) ELSE IF "%FIRST_ARG%"=="stop" ( + goto stop_usage +) ELSE IF "%FIRST_ARG%"=="healthcheck" ( + goto healthcheck_usage +) ELSE IF "%FIRST_ARG%"=="create" ( + goto create_usage +) ELSE IF "%FIRST_ARG%"=="create_core" ( + goto create_core_usage +) ELSE IF "%FIRST_ARG%"=="create_collection" ( + goto create_collection_usage +) ELSE IF "%FIRST_ARG%"=="zk" ( + goto zk_short_usage +) ELSE ( + goto script_usage +) + +:need_java_home +@echo Please set the JAVA_HOME environment variable to the path where you installed Java 1.8+ +goto done + +:need_java_vers +@echo Java 1.8 or later is required to run Solr. +goto done + +:err +@echo. +@echo ERROR: !SCRIPT_ERROR! +@echo. +exit /b 1 + +:done +ENDLOCAL +exit /b 0 + +REM Tests what Java we have and sets some global variables +:resolve_java_info + +CALL :resolve_java_vendor + +set JAVA_MAJOR_VERSION=0 +set JAVA_VERSION_INFO= +set JAVA_BUILD=0 + +"%JAVA%" -version 2>&1 | findstr /i "version" > %TEMP%\javavers +set /p JAVAVEROUT=<%TEMP%\javavers +del javavers + +for /f "tokens=3" %%a in ("!JAVAVEROUT!") do ( + set JAVA_VERSION_INFO=%%a + REM Remove surrounding quotes + set JAVA_VERSION_INFO=!JAVA_VERSION_INFO:"=! + + REM Extract the major Java version, e.g. 7, 8, 9, 10 ... + for /f "tokens=2 delims=." %%a in ("!JAVA_VERSION_INFO!") do ( + set JAVA_MAJOR_VERSION=%%a + ) + + REM Don't look for "_{build}" if we're on IBM J9. + if NOT "%JAVA_VENDOR%" == "IBM J9" ( + for /f "delims=_ tokens=2" %%a in ("!JAVA_VERSION_INFO!") do ( + set /a JAVA_BUILD=%%a + ) + ) +) +GOTO :eof + +REM Set which JVM vendor we have +:resolve_java_vendor +set "JAVA_VENDOR=Oracle" +"%JAVA%" -version 2>&1 | findstr /i "IBM J9" > %TEMP%\javares +set /p JAVA_VENDOR_OUT=<%TEMP%\javares +del javares +if NOT "%JAVA_VENDOR_OUT%" == "" ( + set "JAVA_VENDOR=IBM J9" +) + +set JAVA_VENDOR_OUT= +GOTO :eof + +REM Safe echo which does not mess with () in strings +:safe_echo +set "eout=%1" +set eout=%eout:"=% +echo !eout! +GOTO :eof \ No newline at end of file diff --git a/KeywordSearch/release/solr/bin/autopsy-solr.in.cmd b/KeywordSearch/release/solr/bin/autopsy-solr.in.cmd new file mode 100644 index 0000000000..1bdfa96d97 --- /dev/null +++ b/KeywordSearch/release/solr/bin/autopsy-solr.in.cmd @@ -0,0 +1,114 @@ +@REM +@REM Licensed to the Apache Software Foundation (ASF) under one or more +@REM contributor license agreements. See the NOTICE file distributed with +@REM this work for additional information regarding copyright ownership. +@REM The ASF licenses this file to You under the Apache License, Version 2.0 +@REM (the "License"); you may not use this file except in compliance with +@REM the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. + +REM @echo off + +REM By default the script will use JAVA_HOME to determine which java +REM to use, but you can set a specific path for Solr to use without +REM affecting other Java applications on your server/workstation. +REM set SOLR_JAVA_HOME= + +REM Increase Java Min/Max Heap as needed to support your indexing / query needs +set SOLR_JAVA_MEM=-Xms512m -Xmx512m + +REM Enable verbose GC logging +REM set GC_LOG_OPTS=-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime + +REM These GC settings have shown to work well for a number of common Solr workloads +set GC_TUNE=-XX:NewRatio=3 ^ + -XX:SurvivorRatio=4 ^ + -XX:TargetSurvivorRatio=90 ^ + -XX:MaxTenuringThreshold=8 ^ + -XX:+UseConcMarkSweepGC ^ + -XX:+UseParNewGC ^ + -XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 ^ + -XX:+CMSScavengeBeforeRemark ^ + -XX:PretenureSizeThreshold=64m ^ + -XX:+UseCMSInitiatingOccupancyOnly ^ + -XX:CMSInitiatingOccupancyFraction=50 ^ + -XX:CMSMaxAbortablePrecleanTime=6000 ^ + -XX:+CMSParallelRemarkEnabled ^ + -XX:+ParallelRefProcEnabled + +REM Set the ZooKeeper connection string if using an external ZooKeeper ensemble +REM e.g. host1:2181,host2:2181/chroot +REM Leave empty if not using SolrCloud +REM set ZK_HOST= + +REM Set the ZooKeeper client timeout (for SolrCloud mode) +REM set ZK_CLIENT_TIMEOUT=15000 + +REM By default the start script uses "localhost"; override the hostname here +REM for production SolrCloud environments to control the hostname exposed to cluster state +REM set SOLR_HOST=192.168.1.1 + +REM By default the start script uses UTC; override the timezone if needed +REM set SOLR_TIMEZONE=UTC + +REM Set to true to activate the JMX RMI connector to allow remote JMX client applications +REM to monitor the JVM hosting Solr; set to "false" to disable that behavior +REM (false is recommended in production environments) +set ENABLE_REMOTE_JMX_OPTS=false + +REM The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here +REM set RMI_PORT=18983 + +REM Set the host interface to listen on. Jetty will listen on all interfaces (0.0.0.0) by default. +REM This must be an IPv4 ("a.b.c.d") or bracketed IPv6 ("[x::y]") address, not a hostname! +set SOLR_JETTY_HOST=0.0.0.0 + +set SOLR_OPTS=%SOLR_OPTS% -Djetty.host=%SOLR_JETTY_HOST% + +REM Set the thread stack size +set SOLR_OPTS=%SOLR_OPTS% -Xss256k + +REM Anything you add to the SOLR_OPTS variable will be included in the java +REM start command line as-is, in ADDITION to other options. If you specify the +REM -a option on start script, those options will be appended as well. Examples: +REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoSoftCommit.maxTime=3000 +REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoCommit.maxTime=60000 +REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.clustering.enabled=true +set SOLR_OPTS=%SOLR_OPTS% -Dbootstrap_confdir=../solr/configsets/AutopsyConfig/conf -Dcollection.configName=AutopsyConfig + +REM Path to a directory for Solr to store cores and their data. By default, Solr will use server\solr +REM If solr.xml is not stored in ZooKeeper, this directory needs to contain solr.xml +REM set SOLR_HOME= + +REM Sets the port Solr binds to, default is 8983 +REM set SOLR_PORT=8983 + +REM Uncomment to set SSL-related system properties +REM Be sure to update the paths to the correct keystore for your environment +REM set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks +REM set SOLR_SSL_KEY_STORE_PASSWORD=secret +REM set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks +REM set SOLR_SSL_TRUST_STORE_PASSWORD=secret +REM set SOLR_SSL_NEED_CLIENT_AUTH=false +REM set SOLR_SSL_WANT_CLIENT_AUTH=false + +REM Uncomment if you want to override previously defined SSL values for HTTP client +REM otherwise keep them commented and the above values will automatically be set for HTTP clients +REM set SOLR_SSL_CLIENT_KEY_STORE= +REM set SOLR_SSL_CLIENT_KEY_STORE_PASSWORD= +REM set SOLR_SSL_CLIENT_TRUST_STORE= +REM setSOLR_SSL_CLIENT_TRUST_STORE_PASSWORD= + +REM Settings for ZK ACL +REM set SOLR_ZK_CREDS_AND_ACLS=-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider ^ +REM -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider ^ +REM -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD ^ +REM -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD +REM set SOLR_OPTS=%SOLR_OPTS% %SOLR_ZK_CREDS_AND_ACLS% diff --git a/KeywordSearch/release/solr/bin/init.d/solr b/KeywordSearch/release/solr/bin/init.d/solr new file mode 100644 index 0000000000..e73e0d6830 --- /dev/null +++ b/KeywordSearch/release/solr/bin/init.d/solr @@ -0,0 +1,78 @@ +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +### BEGIN INIT INFO +# Provides: solr +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: Controls Apache Solr as a Service +### END INIT INFO + +# Example of a very simple *nix init script that delegates commands to the bin/solr script +# Typical usage is to do: +# +# cp bin/init.d/solr /etc/init.d/solr +# chmod 755 /etc/init.d/solr +# chown root:root /etc/init.d/solr +# update-rc.d solr defaults +# update-rc.d solr enable + +# Where you extracted the Solr distribution bundle +SOLR_INSTALL_DIR="/opt/solr" + +if [ ! -d "$SOLR_INSTALL_DIR" ]; then + echo "$SOLR_INSTALL_DIR not found! Please check the SOLR_INSTALL_DIR setting in your $0 script." + exit 1 +fi + +# Path to an include file that defines environment specific settings to override default +# variables used by the bin/solr script. It's highly recommended to define this script so +# that you can keep the Solr binary files separated from live files (pid, logs, index data, etc) +# see bin/solr.in.sh for an example +SOLR_ENV="/etc/default/solr.in.sh" + +if [ ! -f "$SOLR_ENV" ]; then + echo "$SOLR_ENV not found! Please check the SOLR_ENV setting in your $0 script." + exit 1 +fi + +# Specify the user to run Solr as; if not set, then Solr will run as root. +# Running Solr as root is not recommended for production environments +RUNAS="solr" + +# verify the specified run as user exists +runas_uid="`id -u "$RUNAS"`" +if [ $? -ne 0 ]; then + echo "User $RUNAS not found! Please create the $RUNAS user before running this script." + exit 1 +fi + +case "$1" in + start|stop|restart|status) + SOLR_CMD="$1" + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit +esac + +if [ -n "$RUNAS" ]; then + su -c "SOLR_INCLUDE=\"$SOLR_ENV\" \"$SOLR_INSTALL_DIR/bin/solr\" $SOLR_CMD" - "$RUNAS" +else + SOLR_INCLUDE="$SOLR_ENV" "$SOLR_INSTALL_DIR/bin/solr" "$SOLR_CMD" +fi diff --git a/KeywordSearch/release/solr/bin/install_solr_service.sh b/KeywordSearch/release/solr/bin/install_solr_service.sh new file mode 100644 index 0000000000..c91777ab7d --- /dev/null +++ b/KeywordSearch/release/solr/bin/install_solr_service.sh @@ -0,0 +1,330 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [[ $EUID -ne 0 ]]; then + echo -e "\nERROR: This script must be run as root\n" 1>&2 + exit 1 +fi + +print_usage() { + ERROR_MSG="$1" + + if [ "$ERROR_MSG" != "" ]; then + echo -e "\nERROR: $ERROR_MSG\n" 1>&2 + fi + + echo "" + echo "Usage: install_solr_service.sh path_to_solr_distribution_archive OPTIONS" + echo "" + echo " The first argument to the script must be a path to a Solr distribution archive, such as solr-5.0.0.tgz" + echo " (only .tgz or .zip are supported formats for the archive)" + echo "" + echo " Supported OPTIONS include:" + echo "" + echo " -d Directory for live / writable Solr files, such as logs, pid files, and index data; defaults to /var/solr" + echo "" + echo " -i Directory to extract the Solr installation archive; defaults to /opt/" + echo " The specified path must exist prior to using this script." + echo "" + echo " -p Port Solr should bind to; default is 8983" + echo "" + echo " -s Service name; defaults to solr" + echo "" + echo " -u User to own the Solr files and run the Solr process as; defaults to solr" + echo " This script will create the specified user account if it does not exist." + echo "" + echo " -f Upgrade Solr. Overwrite symlink and init script of previous installation." + echo "" + echo " NOTE: Must be run as the root user" + echo "" +} # end print_usage + +if [ -f "/proc/version" ]; then + proc_version=`cat /proc/version` +else + proc_version=`uname -a` +fi + +if [[ $proc_version == *"Debian"* ]]; then + distro=Debian +elif [[ $proc_version == *"Red Hat"* ]]; then + distro=RedHat +elif [[ $proc_version == *"Ubuntu"* ]]; then + distro=Ubuntu +elif [[ $proc_version == *"SUSE"* ]]; then + distro=SUSE +else + echo -e "\nERROR: Your Linux distribution ($proc_version) not supported by this script!\nYou'll need to setup Solr as a service manually using the documentation provided in the Solr Reference Guide.\n" 1>&2 + exit 1 +fi + +if [ -z "$1" ]; then + print_usage "Must specify the path to the Solr installation archive, such as solr-5.0.0.tgz" + exit 1 +fi + +SOLR_ARCHIVE=$1 +if [ ! -f "$SOLR_ARCHIVE" ]; then + print_usage "Specified Solr installation archive $SOLR_ARCHIVE not found!" + exit 1 +fi + +# strip off path info +SOLR_INSTALL_FILE=${SOLR_ARCHIVE##*/} +is_tar=true +if [ ${SOLR_INSTALL_FILE: -4} == ".tgz" ]; then + SOLR_DIR=${SOLR_INSTALL_FILE%.tgz} +elif [ ${SOLR_INSTALL_FILE: -4} == ".zip" ]; then + SOLR_DIR=${SOLR_INSTALL_FILE%.zip} + is_tar=false +else + print_usage "Solr installation archive $SOLR_ARCHIVE is invalid, expected a .tgz or .zip file!" + exit 1 +fi + +if [ $# -gt 1 ]; then + shift + while true; do + case $1 in + -i) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "Directory path is required when using the $1 option!" + exit 1 + fi + SOLR_EXTRACT_DIR=$2 + shift 2 + ;; + -d) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "Directory path is required when using the $1 option!" + exit 1 + fi + SOLR_VAR_DIR="$2" + shift 2 + ;; + -u) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "Username is required when using the $1 option!" + exit 1 + fi + SOLR_USER="$2" + shift 2 + ;; + -s) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "Service name is required when using the $1 option!" + exit 1 + fi + SOLR_SERVICE="$2" + shift 2 + ;; + -p) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "Port is required when using the $1 option!" + exit 1 + fi + SOLR_PORT="$2" + shift 2 + ;; + -f) + SOLR_UPGRADE="YES" + shift 1 + ;; + -help|-usage) + print_usage "" + exit 0 + ;; + --) + shift + break + ;; + *) + if [ "$1" != "" ]; then + print_usage "Unrecognized or misplaced argument: $1!" + exit 1 + else + break # out-of-args, stop looping + fi + ;; + esac + done +fi + +if [ -z "$SOLR_EXTRACT_DIR" ]; then + SOLR_EXTRACT_DIR=/opt +fi + +if [ ! -d "$SOLR_EXTRACT_DIR" ]; then + print_usage "Installation directory $SOLR_EXTRACT_DIR not found! Please create it before running this script." + exit 1 +fi + +if [ -z "$SOLR_SERVICE" ]; then + SOLR_SERVICE=solr +fi + +if [ -z "$SOLR_VAR_DIR" ]; then + SOLR_VAR_DIR="/var/$SOLR_SERVICE" +fi + +if [ -z "$SOLR_USER" ]; then + SOLR_USER=solr +fi + +if [ -z "$SOLR_PORT" ]; then + SOLR_PORT=8983 +fi + +if [ -z "$SOLR_UPGRADE" ]; then + SOLR_UPGRADE=NO +fi + +if [ ! "$SOLR_UPGRADE" = "YES" ]; then + if [ -f "/etc/init.d/$SOLR_SERVICE" ]; then + print_usage "/etc/init.d/$SOLR_SERVICE already exists! Perhaps Solr is already setup as a service on this host? To upgrade Solr use the -f option." + exit 1 + fi + + if [ -e "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then + print_usage "$SOLR_EXTRACT_DIR/$SOLR_SERVICE already exists! Please move this directory / link or choose a different service name using the -s option." + exit 1 + fi +fi + +# stop running instance +if [ -f "/etc/init.d/$SOLR_SERVICE" ]; then + echo -e "\nStopping Solr instance if exists ...\n" + service "$SOLR_SERVICE" stop +fi + +# create user if not exists +solr_uid="`id -u "$SOLR_USER"`" +if [ $? -ne 0 ]; then + echo "Creating new user: $SOLR_USER" + if [ "$distro" == "RedHat" ]; then + adduser "$SOLR_USER" + elif [ "$distro" == "SUSE" ]; then + useradd -m "$SOLR_USER" + else + adduser --system --shell /bin/bash --group --disabled-password --home "$SOLR_VAR_DIR" "$SOLR_USER" + fi +fi + +# extract +SOLR_INSTALL_DIR="$SOLR_EXTRACT_DIR/$SOLR_DIR" +if [ ! -d "$SOLR_INSTALL_DIR" ]; then + + echo -e "\nExtracting $SOLR_ARCHIVE to $SOLR_EXTRACT_DIR\n" + + if $is_tar ; then + tar zxf "$SOLR_ARCHIVE" -C "$SOLR_EXTRACT_DIR" + else + unzip -q "$SOLR_ARCHIVE" -d "$SOLR_EXTRACT_DIR" + fi + + if [ ! -d "$SOLR_INSTALL_DIR" ]; then + echo -e "\nERROR: Expected directory $SOLR_INSTALL_DIR not found after extracting $SOLR_ARCHIVE ... script fails.\n" 1>&2 + exit 1 + fi + + chown -R root: "$SOLR_INSTALL_DIR" + find "$SOLR_INSTALL_DIR" -type d -print0 | xargs -0 chmod 0755 + find "$SOLR_INSTALL_DIR" -type f -print0 | xargs -0 chmod 0644 + chmod -R 0755 "$SOLR_INSTALL_DIR/bin" +else + echo -e "\nWARNING: $SOLR_INSTALL_DIR already exists! Skipping extract ...\n" +fi + +# create a symlink for easier scripting +if [ -h "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then + echo -e "\nRemoving old symlink $SOLR_EXTRACT_DIR/$SOLR_SERVICE ...\n" + rm "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" +fi +if [ -e "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then + echo -e "\nWARNING: $SOLR_EXTRACT_DIR/$SOLR_SERVICE is not symlink! Skipping symlink update ...\n" +else + echo -e "\nInstalling symlink $SOLR_EXTRACT_DIR/$SOLR_SERVICE -> $SOLR_INSTALL_DIR ...\n" + ln -s "$SOLR_INSTALL_DIR" "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" +fi + +# install init.d script +echo -e "\nInstalling /etc/init.d/$SOLR_SERVICE script ...\n" +cp "$SOLR_INSTALL_DIR/bin/init.d/solr" "/etc/init.d/$SOLR_SERVICE" +chmod 0744 "/etc/init.d/$SOLR_SERVICE" +chown root: "/etc/init.d/$SOLR_SERVICE" +# do some basic variable substitution on the init.d script +sed_expr1="s#SOLR_INSTALL_DIR=.*#SOLR_INSTALL_DIR=\"$SOLR_EXTRACT_DIR/$SOLR_SERVICE\"#" +sed_expr2="s#SOLR_ENV=.*#SOLR_ENV=\"/etc/default/$SOLR_SERVICE.in.sh\"#" +sed_expr3="s#RUNAS=.*#RUNAS=\"$SOLR_USER\"#" +sed_expr4="s#Provides:.*#Provides: $SOLR_SERVICE#" +sed -i -e "$sed_expr1" -e "$sed_expr2" -e "$sed_expr3" -e "$sed_expr4" "/etc/init.d/$SOLR_SERVICE" + +# install/move configuration +if [ ! -d /etc/default ]; then + mkdir /etc/default + chown root: /etc/default + chmod 0755 /etc/default +fi +if [ -f "$SOLR_VAR_DIR/solr.in.sh" ]; then + echo -e "\nMoving existing $SOLR_VAR_DIR/solr.in.sh to /etc/default/$SOLR_SERVICE.in.sh ...\n" + mv "$SOLR_VAR_DIR/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh" +elif [ -f "/etc/default/$SOLR_SERVICE.in.sh" ]; then + echo -e "\n/etc/default/$SOLR_SERVICE.in.sh already exist. Skipping install ...\n" +else + echo -e "\nInstalling /etc/default/$SOLR_SERVICE.in.sh ...\n" + cp "$SOLR_INSTALL_DIR/bin/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh" + echo "SOLR_PID_DIR=\"$SOLR_VAR_DIR\" +SOLR_HOME=\"$SOLR_VAR_DIR/data\" +LOG4J_PROPS=\"$SOLR_VAR_DIR/log4j.properties\" +SOLR_LOGS_DIR=\"$SOLR_VAR_DIR/logs\" +SOLR_PORT=\"$SOLR_PORT\" +" >> "/etc/default/$SOLR_SERVICE.in.sh" +fi +chown root: "/etc/default/$SOLR_SERVICE.in.sh" +chmod 0644 "/etc/default/$SOLR_SERVICE.in.sh" + +# install data directories and files +mkdir -p "$SOLR_VAR_DIR/data" +mkdir -p "$SOLR_VAR_DIR/logs" +if [ -f "$SOLR_VAR_DIR/data/solr.xml" ]; then + echo -e "\n$SOLR_VAR_DIR/data/solr.xml already exists. Skipping install ...\n" +else + cp "$SOLR_INSTALL_DIR/server/solr/solr.xml" "$SOLR_VAR_DIR/data/solr.xml" +fi +if [ -f "$SOLR_VAR_DIR/log4j.properties" ]; then + echo -e "\n$SOLR_VAR_DIR/log4j.properties already exists. Skipping install ...\n" +else + cp "$SOLR_INSTALL_DIR/server/resources/log4j.properties" "$SOLR_VAR_DIR/log4j.properties" + sed_expr="s#solr.log=.*#solr.log=\${solr.solr.home}/../logs#" + sed -i -e "$sed_expr" "$SOLR_VAR_DIR/log4j.properties" +fi +chown -R "$SOLR_USER:" "$SOLR_VAR_DIR" +find "$SOLR_VAR_DIR" -type d -print0 | xargs -0 chmod 0750 +find "$SOLR_VAR_DIR" -type f -print0 | xargs -0 chmod 0640 + +# configure autostart of service +if [[ "$distro" == "RedHat" || "$distro" == "SUSE" ]]; then + chkconfig "$SOLR_SERVICE" on +else + update-rc.d "$SOLR_SERVICE" defaults +fi + +# start service +service "$SOLR_SERVICE" start +sleep 5 +service "$SOLR_SERVICE" status + +echo "Service $SOLR_SERVICE installed." diff --git a/KeywordSearch/release/solr/bin/oom_solr.sh b/KeywordSearch/release/solr/bin/oom_solr.sh new file mode 100644 index 0000000000..5ecba6bc30 --- /dev/null +++ b/KeywordSearch/release/solr/bin/oom_solr.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +SOLR_PORT=$1 +SOLR_LOGS_DIR=$2 +SOLR_PID=`ps auxww | grep start.jar | grep $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r` +if [ -z "$SOLR_PID" ]; then + echo "Couldn't find Solr process running on port $SOLR_PORT!" + exit +fi +NOW=$(date +"%F_%H_%M_%S") +( +echo "Running OOM killer script for process $SOLR_PID for Solr on port $SOLR_PORT" +kill -9 $SOLR_PID +echo "Killed process $SOLR_PID" +) | tee $SOLR_LOGS_DIR/solr_oom_killer-$SOLR_PORT-$NOW.log diff --git a/KeywordSearch/release/solr/bin/post b/KeywordSearch/release/solr/bin/post new file mode 100644 index 0000000000..73e59ed4c4 --- /dev/null +++ b/KeywordSearch/release/solr/bin/post @@ -0,0 +1,228 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# ====== Common code copied/adapted from bin/solr (TODO: centralize/share this kind of thing across bin/solr, etc) + +THIS_SCRIPT="$0" + +# Resolve symlinks to this script +while [ -h "$THIS_SCRIPT" ] ; do + ls=`ls -ld "$THIS_SCRIPT"` + # Drop everything prior to -> + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + THIS_SCRIPT="$link" + else + THIS_SCRIPT=`dirname "$THIS_SCRIPT"`/"$link" + fi +done + +SOLR_TIP=`dirname "$THIS_SCRIPT"`/.. +SOLR_TIP=`cd "$SOLR_TIP"; pwd` + +if [ -n "$SOLR_JAVA_HOME" ]; then + JAVA="$SOLR_JAVA_HOME/bin/java" +elif [ -n "$JAVA_HOME" ]; then + for java in "$JAVA_HOME"/bin/amd64/java "$JAVA_HOME"/bin/java; do + if [ -x "$java" ]; then + JAVA="$java" + break + fi + done +else + JAVA=java +fi + +# test that Java exists and is executable on this server +"$JAVA" -version >/dev/null 2>&1 || { echo >&2 "Java is required to run this tool! Please install Java 8 or greater before running this script."; exit 1; } + + +# ===== post specific code + +TOOL_JAR=("$SOLR_TIP/dist"/solr-core-*.jar) + +function print_usage() { + echo "" + echo 'Usage: post -c [OPTIONS] ' + echo " or post -help" + echo "" + echo " collection name defaults to DEFAULT_SOLR_COLLECTION if not specified" + echo "" + echo "OPTIONS" + echo "=======" + echo " Solr options:" + echo " -url (overrides collection, host, and port)" + echo " -host (default: localhost)" + echo " -p or -port (default: 8983)" + echo " -commit yes|no (default: yes)" + # optimize intentionally omitted, but can be used as '-optimize yes' (default: no) + echo "" + echo " Web crawl options:" + echo " -recursive (default: 1)" + echo " -delay (default: 10)" + echo "" + echo " Directory crawl options:" + echo " -delay (default: 0)" + echo "" + echo " stdin/args options:" + echo " -type (default: application/xml)" + echo "" + echo " Other options:" + echo " -filetypes [,,...] (default: xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log)" + echo " -params \"=[&=...]\" (values must be URL-encoded; these pass through to Solr update request)" + echo " -out yes|no (default: no; yes outputs Solr response to console)" + echo " -format solr (sends application/json content as Solr commands to /update instead of /update/json/docs)" + echo "" + echo "" + echo "Examples:" + echo "" + echo "* JSON file: $THIS_SCRIPT -c wizbang events.json" + echo "* XML files: $THIS_SCRIPT -c records article*.xml" + echo "* CSV file: $THIS_SCRIPT -c signals LATEST-signals.csv" + echo "* Directory of files: $THIS_SCRIPT -c myfiles ~/Documents" + echo "* Web crawl: $THIS_SCRIPT -c gettingstarted http://lucene.apache.org/solr -recursive 1 -delay 1" + echo "* Standard input (stdin): echo '{"commit": {}}' | $THIS_SCRIPT -c my_collection -type application/json -out yes -d" + echo "* Data as string: $THIS_SCRIPT -c signals -type text/csv -out yes -d $'id,value\n1,0.47'" + echo "" +} # end print_usage + +if [[ $# -eq 1 && ("$1" == "-help" || "$1" == "-h" || "$1" == "-usage") ]]; then + print_usage + exit +fi + + +COLLECTION="$DEFAULT_SOLR_COLLECTION" +PROPS=('-Dauto=yes') +RECURSIVE="" +FILES=() +URLS=() +ARGS=() + +while [ $# -gt 0 ]; do + # TODO: natively handle the optional parameters to SPT + # but for now they can be specified as bin/post -c collection-name delay=5 http://lucidworks.com + + if [[ -d "$1" ]]; then + # Directory +# echo "$1: DIRECTORY" + RECURSIVE=yes + FILES+=("$1") + elif [[ -f "$1" ]]; then + # File +# echo "$1: FILE" + FILES+=("$1") + elif [[ "$1" == http* ]]; then + # URL +# echo "$1: URL" + URLS+=("$1") + else + if [[ "$1" == -* ]]; then + if [[ "$1" == "-c" ]]; then + # Special case, pull out collection name + shift + COLLECTION="$1" + elif [[ "$1" == "-p" ]]; then + # -p alias for -port for convenience and compatibility with `bin/solr start` + shift + PROPS+=("-Dport=$1") + elif [[ ("$1" == "-d" || "$1" == "--data" || "$1" == "-") ]]; then + if [[ ! -t 0 ]]; then + MODE="stdin" + else + # when no stdin exists and -d specified, the rest of the arguments + # are assumed to be strings to post as-is + MODE="args" + shift + if [[ $# -gt 0 ]]; then + ARGS=("$@") + shift $# + else + # SPT needs a valid args string, useful for 'bin/post -c foo -d' to force a commit + ARGS+=("") + fi + fi + else + key="${1:1}" + shift +# echo "$1: PROP" + PROPS+=("-D$key=$1") + if [[ "$key" == "url" ]]; then + SOLR_URL=$1 + fi + fi + else + echo -e "\nUnrecognized argument: $1\n" + echo -e "If this was intended to be a data file, it does not exist relative to $PWD\n" + exit 1 + fi + fi + shift +done + +# Check for errors +if [[ $COLLECTION == "" && $SOLR_URL == "" ]]; then + echo -e "\nCollection or URL must be specified. Use -c or set DEFAULT_SOLR_COLLECTION in your environment, or use -url instead.\n" + echo -e "See '$THIS_SCRIPT -h' for usage instructions.\n" + exit 1 +fi + +# Unsupported: bin/post -c foo +if [[ ${#FILES[@]} == 0 && ${#URLS[@]} == 0 && $MODE != "stdin" && $MODE != "args" ]]; then + echo -e "\nNo files, directories, URLs, -d strings, or stdin were specified.\n" + echo -e "See '$THIS_SCRIPT -h' for usage instructions.\n" + exit 1 +fi + +# SPT does not support mixing different data mode types, just files, just URLs, just stdin, or just argument strings. +# The following are unsupported constructs: +# bin/post -c foo existing_file.csv http://example.com +# echo '' | bin/post -c foo existing_file.csv +# bin/post -c foo existing_file.csv -d 'anything' +if [[ (${#FILES[@]} != 0 && ${#URLS[@]} != 0 && $MODE != "stdin" && $MODE != "args") + || ((${#FILES[@]} != 0 || ${#URLS[@]} != 0) && ($MODE == "stdin" || $MODE == "args")) ]]; then + echo -e "\nCombining files/directories, URLs, stdin, or args is not supported. Post them separately.\n" + exit 1 +fi + +PARAMS="" + +# TODO: let's simplify this +if [[ $MODE != "stdin" && $MODE != "args" ]]; then + if [[ $FILES != "" ]]; then + MODE="files" + PARAMS=("${FILES[@]}") + fi + + if [[ $URLS != "" ]]; then + MODE="web" + PARAMS=("${URLS[@]}") + fi +else + PARAMS=("${ARGS[@]}") +fi + +PROPS+=("-Dc=$COLLECTION" "-Ddata=$MODE") +if [[ -n "$RECURSIVE" ]]; then + PROPS+=('-Drecursive=yes') +fi + +echo "$JAVA" -classpath "${TOOL_JAR[0]}" "${PROPS[@]}" org.apache.solr.util.SimplePostTool "${PARAMS[@]}" +"$JAVA" -classpath "${TOOL_JAR[0]}" "${PROPS[@]}" org.apache.solr.util.SimplePostTool "${PARAMS[@]}" + +# post smoker: +# bin/post -c signals -out yes -type application/json -d '[{"id": 2, "val": 0.47}]' +# bin/post -c signals -out yes -params "wt=json" -d '1' diff --git a/KeywordSearch/release/solr/bin/solr b/KeywordSearch/release/solr/bin/solr new file mode 100644 index 0000000000..ff804af3b2 --- /dev/null +++ b/KeywordSearch/release/solr/bin/solr @@ -0,0 +1,1560 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# CONTROLLING STARTUP: +# +# Use solr -help to see available command-line options. In addition +# to passing command-line options, this script looks for an include +# file named solr.in.sh to set environment variables. Specifically, +# the following locations are searched in this order: +# +# ./ +# $HOME/.solr.in.sh +# /usr/share/solr +# /usr/local/share/solr +# /var/solr/ +# /opt/solr +# +# Another option is to specify the full path to the include file in the +# environment. For example: +# +# $ SOLR_INCLUDE=/path/to/solr.in.sh solr start +# +# Note: This is particularly handy for running multiple instances on a +# single installation, or for quick tests. +# +# Finally, developers and enthusiasts who frequently run from an SVN +# checkout, and do not want to locally modify bin/solr.in.sh, can put +# a customized include file at ~/.solr.in.sh. +# +# If you would rather configure startup entirely from the environment, you +# can disable the include by exporting an empty SOLR_INCLUDE, or by +# ensuring that no include files exist in the aforementioned search list. + +SOLR_SCRIPT="$0" +verbose=false +THIS_OS=`uname -s` + +stop_all=false + +# for now, we don't support running this script from cygwin due to problems +# like not having lsof, ps auxww, curl, and awkward directory handling +if [ "${THIS_OS:0:6}" == "CYGWIN" ]; then + echo -e "This script does not support cygwin due to severe limitations and lack of adherence\nto BASH standards, such as lack of lsof, curl, and ps options.\n\nPlease use the native solr.cmd script on Windows!" + exit 1 +fi + +# Resolve symlinks to this script +while [ -h "$SOLR_SCRIPT" ] ; do + ls=`ls -ld "$SOLR_SCRIPT"` + # Drop everything prior to -> + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SOLR_SCRIPT="$link" + else + SOLR_SCRIPT=`dirname "$SOLR_SCRIPT"`/"$link" + fi +done + +SOLR_TIP=`dirname "$SOLR_SCRIPT"`/.. +SOLR_TIP=`cd "$SOLR_TIP"; pwd` +DEFAULT_SERVER_DIR="$SOLR_TIP/server" + +# If an include wasn't specified in the environment, then search for one... +if [ -z "$SOLR_INCLUDE" ]; then + # Locations (in order) to use when searching for an include file. + for include in "`dirname "$0"`/solr.in.sh" \ + "$HOME/.solr.in.sh" \ + /usr/share/solr/solr.in.sh \ + /usr/local/share/solr/solr.in.sh \ + /etc/default/solr.in.sh \ + /opt/solr/solr.in.sh; do + if [ -r "$include" ]; then + . "$include" + break + fi + done +elif [ -r "$SOLR_INCLUDE" ]; then + . "$SOLR_INCLUDE" +fi + +if [ -z "$SOLR_PID_DIR" ]; then + SOLR_PID_DIR="$SOLR_TIP/bin" +fi + +if [ -n "$SOLR_JAVA_HOME" ]; then + JAVA="$SOLR_JAVA_HOME/bin/java" +elif [ -n "$JAVA_HOME" ]; then + for java in "$JAVA_HOME"/bin/amd64/java "$JAVA_HOME"/bin/java; do + if [ -x "$java" ]; then + JAVA="$java" + break + fi + done + if [ -z "$JAVA" ]; then + echo >&2 "The currently defined JAVA_HOME ($JAVA_HOME) refers" + echo >&2 "to a location where Java could not be found. Aborting." + echo >&2 "Either fix the JAVA_HOME variable or remove it from the" + echo >&2 "environment so that the system PATH will be searched." + exit 1 + fi +else + JAVA=java +fi + +# test that Java exists and is executable on this server +"$JAVA" -version >/dev/null 2>&1 || { + echo >&2 "Java not found, or an error was encountered when running java." + echo >&2 "A working Java 8 is required to run Solr!" + echo >&2 "Please install Java 8 or fix JAVA_HOME before running this script." + echo >&2 "Command that we tried: '${JAVA} -version'" + echo >&2 "Active Path:" + echo >&2 "${PATH}" + exit 1 +} + +# Select HTTP OR HTTPS related configurations +SOLR_URL_SCHEME=http +SOLR_JETTY_CONFIG=() +SOLR_SSL_OPTS="" +if [ -n "$SOLR_SSL_KEY_STORE" ]; then + SOLR_JETTY_CONFIG+=("--module=https") + SOLR_URL_SCHEME=https + SOLR_SSL_OPTS=" -Dsolr.jetty.keystore=$SOLR_SSL_KEY_STORE \ + -Dsolr.jetty.keystore.password=$SOLR_SSL_KEY_STORE_PASSWORD \ + -Dsolr.jetty.truststore=$SOLR_SSL_TRUST_STORE \ + -Dsolr.jetty.truststore.password=$SOLR_SSL_TRUST_STORE_PASSWORD \ + -Dsolr.jetty.ssl.needClientAuth=$SOLR_SSL_NEED_CLIENT_AUTH \ + -Dsolr.jetty.ssl.wantClientAuth=$SOLR_SSL_WANT_CLIENT_AUTH" + if [ -n "$SOLR_SSL_CLIENT_KEY_STORE" ]; then + SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_CLIENT_KEY_STORE \ + -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_CLIENT_KEY_STORE_PASSWORD \ + -Djavax.net.ssl.trustStore=$SOLR_SSL_CLIENT_TRUST_STORE \ + -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD" + else + SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_KEY_STORE \ + -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_KEY_STORE_PASSWORD \ + -Djavax.net.ssl.trustStore=$SOLR_SSL_TRUST_STORE \ + -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_TRUST_STORE_PASSWORD" + fi +else + SOLR_JETTY_CONFIG+=("--module=http") +fi + +# Authentication options +if [ "$SOLR_AUTHENTICATION_CLIENT_CONFIGURER" != "" ]; then + AUTHC_CLIENT_CONFIGURER_ARG="-Dsolr.authentication.httpclient.configurer=$SOLR_AUTHENTICATION_CLIENT_CONFIGURER" +fi +AUTHC_OPTS="$AUTHC_CLIENT_CONFIGURER_ARG $SOLR_AUTHENTICATION_OPTS" + +# Set the SOLR_TOOL_HOST variable for use when connecting to a running Solr instance +if [ "$SOLR_HOST" != "" ]; then + SOLR_TOOL_HOST="$SOLR_HOST" +else + SOLR_TOOL_HOST="localhost" +fi + +function print_usage() { + CMD="$1" + ERROR_MSG="$2" + + if [ "$ERROR_MSG" != "" ]; then + echo -e "\nERROR: $ERROR_MSG\n" + fi + + if [ -z "$CMD" ]; then + echo "" + echo "Usage: solr COMMAND OPTIONS" + echo " where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk" + echo "" + echo " Standalone server example (start Solr running in the background on port 8984):" + echo "" + echo " ./solr start -p 8984" + echo "" + echo " SolrCloud example (start Solr running in SolrCloud mode using localhost:2181 to connect to Zookeeper, with 1g max heap size and remote Java debug options enabled):" + echo "" + echo " ./solr start -c -m 1g -z localhost:2181 -a \"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044\"" + echo "" + echo "Pass -help after any COMMAND to see command-specific usage information," + echo " such as: ./solr start -help or ./solr stop -help" + echo "" + elif [[ "$CMD" == "start" || "$CMD" == "restart" ]]; then + echo "" + echo "Usage: solr $CMD [-f] [-c] [-h hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-a \"additional-options\"] [-V]" + echo "" + echo " -f Start Solr in foreground; default starts Solr in the background" + echo " and sends stdout / stderr to solr-PORT-console.log" + echo "" + echo " -c or -cloud Start Solr in SolrCloud mode; if -z not supplied, an embedded Zookeeper" + echo " instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983" + echo "" + echo " -h Specify the hostname for this Solr instance" + echo "" + echo " -p Specify the port to start the Solr HTTP listener on; default is 8983" + echo " The specified port (SOLR_PORT) will also be used to determine the stop port" + echo " STOP_PORT=(\$SOLR_PORT-1000) and JMX RMI listen port RMI_PORT=(1\$SOLR_PORT). " + echo " For instance, if you set -p 8985, then the STOP_PORT=7985 and RMI_PORT=18985" + echo "" + echo " -d Specify the Solr server directory; defaults to server" + echo "" + echo " -z Zookeeper connection string; only used when running in SolrCloud mode using -c" + echo " To launch an embedded Zookeeper instance, don't pass this parameter." + echo "" + echo " -m Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g" + echo " results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m" + echo "" + echo " -s Sets the solr.solr.home system property; Solr will create core directories under" + echo " this directory. This allows you to run multiple Solr instances on the same host" + echo " while reusing the same server directory set using the -d parameter. If set, the" + echo " specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper." + echo " This parameter is ignored when running examples (-e), as the solr.solr.home depends" + echo " on which example is run. The default value is server/solr." + echo "" + echo " -e Name of the example to run; available examples:" + echo " cloud: SolrCloud example" + echo " techproducts: Comprehensive example illustrating many of Solr's core capabilities" + echo " dih: Data Import Handler" + echo " schemaless: Schema-less example" + echo "" + echo " -a Additional parameters to pass to the JVM when starting Solr, such as to setup" + echo " Java debug options. For example, to enable a Java debugger to attach to the Solr JVM" + echo " you could pass: -a \"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983\"" + echo " In most cases, you should wrap the additional parameters in double quotes." + echo "" + echo " -noprompt Don't prompt for input; accept all defaults when running examples that accept user input" + echo "" + echo " -V Verbose messages from this script" + echo "" + elif [ "$CMD" == "stop" ]; then + echo "" + echo "Usage: solr stop [-k key] [-p port] [-V]" + echo "" + echo " -k Stop key; default is solrrocks" + echo "" + echo " -p Specify the port the Solr HTTP listener is bound to" + echo "" + echo " -all Find and stop all running Solr servers on this host" + echo "" + echo " NOTE: To see if any Solr servers are running, do: solr status" + echo "" + elif [ "$CMD" == "healthcheck" ]; then + echo "" + echo "Usage: solr healthcheck [-c collection] [-z zkHost]" + echo "" + echo " -c Collection to run healthcheck against." + echo "" + echo " -z Zookeeper connection string; default is localhost:9983" + echo "" + elif [ "$CMD" == "status" ]; then + echo "" + echo "Usage: solr status" + echo "" + echo " NOTE: This command will show the status of all running Solr servers" + echo "" + elif [ "$CMD" == "create" ]; then + echo "" + echo "Usage: solr create [-c name] [-d confdir] [-n configName] [-shards #] [-replicationFactor #] [-p port]" + echo "" + echo " Create a core or collection depending on whether Solr is running in standalone (core) or SolrCloud" + echo " mode (collection). In other words, this action detects which mode Solr is running in, and then takes" + echo " the appropriate action (either create_core or create_collection). For detailed usage instructions, do:" + echo "" + echo " bin/solr create_core -help" + echo "" + echo " or" + echo "" + echo " bin/solr create_collection -help" + echo "" + elif [ "$CMD" == "delete" ]; then + echo "" + echo "Usage: solr delete [-c name] [-deleteConfig true|false] [-p port]" + echo "" + echo " Deletes a core or collection depending on whether Solr is running in standalone (core) or SolrCloud" + echo " mode (collection). If you're deleting a collection in SolrCloud mode, the default behavior is to also" + echo " delete the configuration directory from Zookeeper so long as it is not being used by another collection." + echo " You can override this behavior by passing -deleteConfig false when running this command." + echo "" + echo " -c Name of the core / collection to delete" + echo "" + echo " -deleteConfig Delete the configuration directory from Zookeeper; default is true" + echo "" + echo " -p Port of a local Solr instance where you want to delete the core/collection" + echo " If not specified, the script will search the local system for a running" + echo " Solr instance and will use the port of the first server it finds." + echo "" + elif [ "$CMD" == "create_core" ]; then + echo "" + echo "Usage: solr create_core [-c core] [-d confdir] [-p port]" + echo "" + echo " -c Name of core to create" + echo "" + echo " -d Configuration directory to copy when creating the new core, built-in options are:" + echo "" + echo " basic_configs: Minimal Solr configuration" + echo " data_driven_schema_configs: Managed schema with field-guessing support enabled" + echo " sample_techproducts_configs: Example configuration with many optional features enabled to" + echo " demonstrate the full power of Solr" + echo "" + echo " If not specified, default is: data_driven_schema_configs" + echo "" + echo " Alternatively, you can pass the path to your own configuration directory instead of using" + echo " one of the built-in configurations, such as: bin/solr create_core -c mycore -d /tmp/myconfig" + echo "" + echo " -p Port of a local Solr instance where you want to create the new core" + echo " If not specified, the script will search the local system for a running" + echo " Solr instance and will use the port of the first server it finds." + echo "" + elif [ "$CMD" == "create_collection" ]; then + echo "" + echo "Usage: solr create_collection [-c collection] [-d confdir] [-n configName] [-shards #] [-replicationFactor #] [-p port]" + echo "" + echo " -c Name of collection to create" + echo "" + echo " -d Configuration directory to copy when creating the new collection, built-in options are:" + echo "" + echo " basic_configs: Minimal Solr configuration" + echo " data_driven_schema_configs: Managed schema with field-guessing support enabled" + echo " sample_techproducts_configs: Example configuration with many optional features enabled to" + echo " demonstrate the full power of Solr" + echo "" + echo " If not specified, default is: data_driven_schema_configs" + echo "" + echo " Alternatively, you can pass the path to your own configuration directory instead of using" + echo " one of the built-in configurations, such as: bin/solr create_collection -c mycoll -d /tmp/myconfig" + echo "" + echo " By default the script will upload the specified confdir directory into Zookeeper using the same" + echo " name as the collection (-c) option. Alternatively, if you want to reuse an existing directory" + echo " or create a confdir in Zookeeper that can be shared by multiple collections, use the -n option" + echo "" + echo " -n Name the configuration directory in Zookeeper; by default, the configuration" + echo " will be uploaded to Zookeeper using the collection name (-c), but if you want" + echo " to use an existing directory or override the name of the configuration in" + echo " Zookeeper, then use the -c option." + echo "" + echo " -shards <#> Number of shards to split the collection into; default is 1" + echo "" + echo " -replicationFactor <#> Number of copies of each document in the collection, default is 1 (no replication)" + echo "" + echo " -p Port of a local Solr instance where you want to create the new collection" + echo " If not specified, the script will search the local system for a running" + echo " Solr instance and will use the port of the first server it finds." + echo "" + elif [ "$CMD" == "zk" ]; then + print_short_zk_usage "" + echo " Be sure to check the Solr logs in case of errors." + echo "" + echo " -z zkHost Optional Zookeeper connection string for all commands. If specified it" + echo " overrides the 'ZK_HOST=...'' defined in solr.in.sh." + echo "" + echo " upconfig uploads a configset from the local machine to Zookeeper. (Backcompat: -upconfig)" + echo "" + echo " downconfig downloads a configset from Zookeeper to the local machine. (Backcompat: -downconfig)" + echo "" + echo " -n configName   Name of the configset in Zookeeper that will be the destination of" + echo " 'upconfig' and the source for 'downconfig'." + echo "" + echo " -d confdir      The local directory the configuration will be uploaded from for" + echo " 'upconfig' or downloaded to for 'downconfig'. If 'confdir' is a child of" + echo " ...solr/server/solr/configsets' then the configs will be copied from/to" + echo " that directory. Otherwise it is interpreted as a simple local path." + echo "" + echo " cp copies files or folders to/from Zookeeper or Zokeeper -> Zookeeper" + echo " -r   Recursively copy to . Command will fail if has children and " + echo " -r is not specified. Optional" + echo "" + echo " , : [file:][/]path/to/local/file or zk:/path/to/zk/node" + echo " NOTE: and may both be Zookeeper resources prefixed by 'zk:'" + echo " When is a zk resource, may be '.'" + echo " If ends with '/', then will be a local folder or parent znode and the last" + echo " element of the path will be appended." + echo "" + echo " The 'file:' prefix is stripped, thus 'file:/' specifies an absolute local path and" + echo " 'file:somewhere' specifies a relative local path. All paths on Zookeeper are absolute" + echo " so the slash is required." + echo "" + echo " Zookeeper nodes CAN have data, so moving a single file to a parent znode" + echo " will overlay the data on the parent Znode so specifying the trailing slash" + echo " is important." + echo "" + echo " Wildcards are not supported" + echo "" + echo " rm deletes files or folders on Zookeeper" + echo " -r     Recursively delete if is a directory. Command will fail if " + echo " has children and -r is not specified. Optional" + echo "  : [zk:]/path/to/zk/node. may not be the root ('/')" + echo "" + echo " mv moves (renames) znodes on Zookeeper" + echo " , : Zookeeper nodes, the 'zk:' prefix is optional." + echo " If ends with '/', then will be a parent znode" + echo " and the last element of the path will be appended." + echo " Zookeeper nodes CAN have data, so moving a single file to a parent znode" + echo " will overlay the data on the parent Znode so specifying the trailing slash" + echo " is important." + echo "" + echo " ls lists the znodes on Zookeeper" + echo " -r recursively descends the path listing all znodes. Optional" + echo " : The Zookeeper path to use as the root." + echo "" + echo " Only the node names are listed, not data" + echo "" + fi +} # end print_usage + +function print_short_zk_usage() { + + if [ "$1" != "" ]; then + echo -e "\nERROR: $1\n" + fi + + echo " Usage: solr zk upconfig|downconfig -d -n [-z zkHost]" + echo " solr zk cp [-r] [-z zkHost]" + echo " solr zk rm [-r] [-z zkHost]" + echo " solr zk mv [-z zkHost]" + echo " solr zk ls [-r] [-z zkHost]" + echo "" + + if [ "$1" == "" ]; then + echo "Type bin/solr zk -help for full usage help" + else + exit 1 + fi +} + +# used to show the script is still alive when waiting on work to complete +function spinner() { + local pid=$1 + local delay=0.5 + local spinstr='|/-\' + while [ "$(ps aux | awk '{print $2}' | grep -w $pid)" ]; do + local temp=${spinstr#?} + printf " [%c] " "$spinstr" + local spinstr=$temp${spinstr%"$temp"} + sleep $delay + printf "\b\b\b\b\b\b" + done + printf " \b\b\b\b" +} + +# given a port, find the pid for a Solr process +function solr_pid_by_port() { + THE_PORT="$1" + if [ -e "$SOLR_PID_DIR/solr-$THE_PORT.pid" ]; then + PID=`cat "$SOLR_PID_DIR/solr-$THE_PORT.pid"` + CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $PID | sort -r | tr -d ' '` + if [ "$CHECK_PID" != "" ]; then + local solrPID=$PID + fi + fi + echo "$solrPID" +} + +# extract the value of the -Djetty.port parameter from a running Solr process +function jetty_port() { + SOLR_PID="$1" + SOLR_PROC=`ps auxww | grep -w $SOLR_PID | grep start\.jar | grep jetty.port` + IFS=' ' read -a proc_args <<< "$SOLR_PROC" + for arg in "${proc_args[@]}" + do + IFS='=' read -a pair <<< "$arg" + if [ "${pair[0]}" == "-Djetty.port" ]; then + local jetty_port="${pair[1]}" + break + fi + done + echo "$jetty_port" +} # end jetty_port func + +# run a Solr command-line tool using the SolrCLI class; +# useful for doing cross-platform work from the command-line using Java +function run_tool() { + + "$JAVA" $SOLR_SSL_OPTS $AUTHC_OPTS $SOLR_ZK_CREDS_AND_ACLS -Dsolr.install.dir="$SOLR_TIP" \ + -Dlog4j.configuration="file:$DEFAULT_SERVER_DIR/scripts/cloud-scripts/log4j.properties" \ + -classpath "$DEFAULT_SERVER_DIR/solr-webapp/webapp/WEB-INF/lib/*:$DEFAULT_SERVER_DIR/lib/ext/*" \ + org.apache.solr.util.SolrCLI "$@" + + return $? +} # end run_tool function + +# get information about any Solr nodes running on this host +function get_info() { + CODE=4 + # first, see if Solr is running + numSolrs=`find "$SOLR_PID_DIR" -name "solr-*.pid" -type f | wc -l | tr -d ' '` + if [ "$numSolrs" != "0" ]; then + echo -e "\nFound $numSolrs Solr nodes: " + while read PIDF + do + ID=`cat "$PIDF"` + port=`jetty_port "$ID"` + if [ "$port" != "" ]; then + echo -e "\nSolr process $ID running on port $port" + run_tool status -solr "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$port/solr" + CODE=$? + echo "" + else + echo -e "\nSolr process $ID from $PIDF not found." + CODE=1 + fi + done < <(find "$SOLR_PID_DIR" -name "solr-*.pid" -type f) + else + # no pid files but check using ps just to be sure + numSolrs=`ps auxww | grep start\.jar | grep solr.solr.home | grep -v grep | wc -l | sed -e 's/^[ \t]*//'` + if [ "$numSolrs" != "0" ]; then + echo -e "\nFound $numSolrs Solr nodes: " + PROCESSES=$(ps auxww | grep start\.jar | grep solr.solr.home | grep -v grep | awk '{print $2}' | sort -r) + for ID in $PROCESSES + do + port=`jetty_port "$ID"` + if [ "$port" != "" ]; then + echo "" + echo "Solr process $ID running on port $port" + run_tool status -solr "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$port/solr" + CODE=$? + echo "" + fi + done + else + echo -e "\nNo Solr nodes are running.\n" + CODE=3 + fi + fi + + return $CODE +} # end get_info + +# tries to gracefully stop Solr using the Jetty +# stop command and if that fails, then uses kill -9 +function stop_solr() { + + DIR="$1" + SOLR_PORT="$2" + STOP_PORT=`expr $SOLR_PORT - 1000` + STOP_KEY="$3" + SOLR_PID="$4" + + if [ "$SOLR_PID" != "" ]; then + echo -e "Sending stop command to Solr running on port $SOLR_PORT ... waiting 5 seconds to allow Jetty process $SOLR_PID to stop gracefully." + "$JAVA" $SOLR_SSL_OPTS $AUTHC_OPTS -jar "$DIR/start.jar" "STOP.PORT=$STOP_PORT" "STOP.KEY=$STOP_KEY" --stop || true + (sleep 5) & + spinner $! + rm -f "$SOLR_PID_DIR/solr-$SOLR_PORT.pid" + else + echo -e "No Solr nodes found to stop." + exit 0 + fi + + CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $SOLR_PID | sort -r | tr -d ' '` + if [ "$CHECK_PID" != "" ]; then + echo -e "Solr process $SOLR_PID is still running; forcefully killing it now." + kill -9 $SOLR_PID + echo "Killed process $SOLR_PID" + rm -f "$SOLR_PID_DIR/solr-$SOLR_PORT.pid" + sleep 1 + fi + + CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $SOLR_PID | sort -r | tr -d ' '` + if [ "$CHECK_PID" != "" ]; then + echo "ERROR: Failed to kill previous Solr Java process $SOLR_PID ... script fails." + exit 1 + fi +} # end stop_solr + +if [ $# -eq 1 ]; then + case $1 in + -help|-usage|-h|--help) + print_usage "" + exit + ;; + -info|-i|status) + get_info + exit $? + ;; + -version|-v|version) + run_tool version + exit + ;; + esac +fi + +if [ $# -gt 0 ]; then + # if first arg starts with a dash (and it's not -help or -info), + # then assume they are starting Solr, such as: solr -f + if [[ $1 == -* ]]; then + SCRIPT_CMD="start" + else + SCRIPT_CMD="$1" + shift + fi +else + # no args - just show usage and exit + print_usage "" + exit +fi + +if [ "$SCRIPT_CMD" == "status" ]; then + # hacky - the script hits this if the user passes additional args with the status command, + # which is not supported but also not worth complaining about either + get_info + exit +fi + +# run a healthcheck and exit if requested +if [ "$SCRIPT_CMD" == "healthcheck" ]; then + + if [ $# -gt 0 ]; then + while true; do + case "$1" in + -c|-collection) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Collection name is required when using the $1 option!" + exit 1 + fi + HEALTHCHECK_COLLECTION="$2" + shift 2 + ;; + -z|-zkhost) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "ZooKeeper connection string is required when using the $1 option!" + exit 1 + fi + ZK_HOST="$2" + shift 2 + ;; + -help|-usage) + print_usage "$SCRIPT_CMD" + exit 0 + ;; + --) + shift + break + ;; + *) + if [ "$1" != "" ]; then + print_usage "$SCRIPT_CMD" "Unrecognized or misplaced argument: $1!" + exit 1 + else + break # out-of-args, stop looping + fi + ;; + esac + done + fi + + if [ -z "$ZK_HOST" ]; then + ZK_HOST=localhost:9983 + fi + + if [ -z "$HEALTHCHECK_COLLECTION" ]; then + echo "collection parameter is required!" + print_usage "healthcheck" + exit 1 + fi + + run_tool healthcheck -zkHost "$ZK_HOST" -collection "$HEALTHCHECK_COLLECTION" + + exit $? +fi + +# create a core or collection +if [[ "$SCRIPT_CMD" == "create" || "$SCRIPT_CMD" == "create_core" || "$SCRIPT_CMD" == "create_collection" ]]; then + + CREATE_NUM_SHARDS=1 + CREATE_REPFACT=1 + + if [ $# -gt 0 ]; then + while true; do + case "$1" in + -c|-core|-collection) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "name is required when using the $1 option!" + exit 1 + fi + CREATE_NAME="$2" + shift 2 + ;; + -n|-confname) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Configuration name is required when using the $1 option!" + exit 1 + fi + CREATE_CONFNAME="$2" + shift 2 + ;; + -d|-confdir) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Configuration directory is required when using the $1 option!" + exit 1 + fi + CREATE_CONFDIR="$2" + shift 2 + ;; + -s|-shards) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Shard count is required when using the $1 option!" + exit 1 + fi + CREATE_NUM_SHARDS="$2" + shift 2 + ;; + -rf|-replicationFactor) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Replication factor is required when using the $1 option!" + exit 1 + fi + CREATE_REPFACT="$2" + shift 2 + ;; + -p|-port) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Solr port is required when using the $1 option!" + exit 1 + fi + CREATE_PORT="$2" + shift 2 + ;; + -help|-usage) + print_usage "$SCRIPT_CMD" + exit 0 + ;; + --) + shift + break + ;; + *) + if [ "$1" != "" ]; then + print_usage "$SCRIPT_CMD" "Unrecognized or misplaced argument: $1!" + exit 1 + else + break # out-of-args, stop looping + fi + ;; + esac + done + fi + + if [ -z "$CREATE_CONFDIR" ]; then + CREATE_CONFDIR='data_driven_schema_configs' + fi + + # validate the confdir arg + if [[ ! -d "$SOLR_TIP/server/solr/configsets/$CREATE_CONFDIR" && ! -d "$CREATE_CONFDIR" ]]; then + echo -e "\nSpecified configuration directory $CREATE_CONFDIR not found!\n" + exit 1 + fi + + if [ -z "$CREATE_NAME" ]; then + echo "Name (-c) argument is required!" + print_usage "$SCRIPT_CMD" + exit 1 + fi + + # If not defined, use the collection name for the name of the configuration in Zookeeper + if [ -z "$CREATE_CONFNAME" ]; then + CREATE_CONFNAME="$CREATE_NAME" + fi + + if [ -z "$CREATE_PORT" ]; then + for ID in `ps auxww | grep java | grep start\.jar | awk '{print $2}' | sort -r` + do + port=`jetty_port "$ID"` + if [ "$port" != "" ]; then + CREATE_PORT=$port + break + fi + done + fi + + if [ -z "$CREATE_PORT" ]; then + echo "Failed to determine the port of a local Solr instance, cannot create $CREATE_NAME!" + exit 1 + fi + + if [ "$SCRIPT_CMD" == "create_core" ]; then + run_tool create_core -name "$CREATE_NAME" -solrUrl "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$CREATE_PORT/solr" \ + -confdir "$CREATE_CONFDIR" -configsetsDir "$SOLR_TIP/server/solr/configsets" + exit $? + else + run_tool "$SCRIPT_CMD" -name "$CREATE_NAME" -solrUrl "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$CREATE_PORT/solr" \ + -shards "$CREATE_NUM_SHARDS" -replicationFactor "$CREATE_REPFACT" \ + -confname "$CREATE_CONFNAME" -confdir "$CREATE_CONFDIR" \ + -configsetsDir "$SOLR_TIP/server/solr/configsets" + exit $? + fi +fi + +# delete a core or collection +if [[ "$SCRIPT_CMD" == "delete" ]]; then + + if [ $# -gt 0 ]; then + while true; do + case "$1" in + -c|-core|-collection) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "name is required when using the $1 option!" + exit 1 + fi + DELETE_NAME="$2" + shift 2 + ;; + -p|-port) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Solr port is required when using the $1 option!" + exit 1 + fi + DELETE_PORT="$2" + shift 2 + ;; + -deleteConfig) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "true|false is required when using the $1 option!" + exit 1 + fi + DELETE_CONFIG="$2" + shift 2 + ;; + -help|-usage) + print_usage "$SCRIPT_CMD" + exit 0 + ;; + --) + shift + break + ;; + *) + if [ "$1" != "" ]; then + print_usage "$SCRIPT_CMD" "Unrecognized or misplaced argument: $1!" + exit 1 + else + break # out-of-args, stop looping + fi + ;; + esac + done + fi + + if [ -z "$DELETE_NAME" ]; then + echo "Name (-c) argument is required!" + print_usage "$SCRIPT_CMD" + exit 1 + fi + + # If not defined, use the collection name for the name of the configuration in Zookeeper + if [ -z "$DELETE_CONFIG" ]; then + DELETE_CONFIG=true + fi + + if [ -z "$DELETE_PORT" ]; then + for ID in `ps auxww | grep java | grep start\.jar | awk '{print $2}' | sort -r` + do + port=`jetty_port "$ID"` + if [ "$port" != "" ]; then + DELETE_PORT=$port + break + fi + done + fi + + if [ -z "$DELETE_PORT" ]; then + echo "Failed to determine the port of a local Solr instance, cannot delete $DELETE_NAME!" + exit 1 + fi + + run_tool delete -name "$DELETE_NAME" -deleteConfig "$DELETE_CONFIG" \ + -solrUrl "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$DELETE_PORT/solr" + exit $? +fi + +ZK_RECURSE=false +# Zookeeper file maintenance (upconfig, downconfig, files up/down etc.) +# It's a little clumsy to have the parsing go round and round for upconfig and downconfig, but that's +# necessary for back-compat +if [[ "$SCRIPT_CMD" == "zk" ]]; then + + if [ $# -gt 0 ]; then + while true; do + case "$1" in + -upconfig|upconfig|-downconfig|downconfig|cp|rm|mv|ls) + if [ "${1:0:1}" == "-" ]; then + ZK_OP=${1:1} + else + ZK_OP=$1 + fi + shift 1 + ;; + -z|-zkhost) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_short_zk_usage "$SCRIPT_CMD" "ZooKeeper connection string is required when using the $1 option!" + fi + ZK_HOST="$2" + shift 2 + ;; + -n|-confname) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_short_zk_usage "$SCRIPT_CMD" "Configuration name is required when using the $1 option!" + fi + CONFIGSET_CONFNAME="$2" + shift 2 + ;; + -d|-confdir) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_short_zk_usage "$SCRIPT_CMD" "Configuration directory is required when using the $1 option!" + fi + CONFIGSET_CONFDIR="$2" + shift 2 + ;; + -r) + ZK_RECURSE="true" + shift + ;; + -help|-usage|-h) + print_usage "$SCRIPT_CMD" + exit 0 + ;; + --) + shift + break + ;; + *) # Pick up or params for rm, ls, cp, mv. + if [ "$1" == "" ]; then + break # out-of-args, stop looping + fi + if [ -z "$ZK_SRC" ]; then + ZK_SRC=$1 + else + if [ -z "$ZK_DST" ]; then + ZK_DST=$1 + else + print_short_zk_usage "Unrecognized or misplaced command $1" + fi + fi + shift + ;; + esac + done + fi + + if [ -z "$ZK_OP" ]; then + print_short_zk_usage "Zookeeper operation (one of 'upconfig', 'downconfig', 'rm', 'mv', 'cp', 'ls') is required!" + fi + + if [ -z "$ZK_HOST" ]; then + print_short_zk_usage "Zookeeper address (-z) argument is required or ZK_HOST must be specified in the solr.in.sh file." + fi + + if [[ "$ZK_OP" == "upconfig" || "$ZK_OP" == "downconfig" ]]; then + if [ -z "$CONFIGSET_CONFDIR" ]; then + print_short_zk_usage "Local directory of the configset (-d) argument is required!" + fi + + if [ -z "$CONFIGSET_CONFNAME" ]; then + print_short_zk_usage "Configset name on Zookeeper (-n) argument is required!" + fi + fi + + if [[ "$ZK_OP" == "cp" || "$ZK_OP" == "mv" ]]; then + if [[ -z "$ZK_SRC" || -z "$ZK_DST" ]]; then + print_short_zk_usage " and must be specified when using either the 'mv' or 'cp' commands." + fi + if [[ "$ZK_OP" == "cp" && "${ZK_SRC:0:3}" != "zk:" && "${ZK_DST:0:3}" != "zk:" ]]; then + print_short_zk_usage "One of the source or desintation paths must be prefixed by 'zk:' for the 'cp' command." + fi + fi + + case "$ZK_OP" in + upconfig) + run_tool "$ZK_OP" -confname "$CONFIGSET_CONFNAME" -confdir "$CONFIGSET_CONFDIR" -zkHost "$ZK_HOST" -configsetsDir "$SOLR_TIP/server/solr/configsets" + ;; + downconfig) + run_tool "$ZK_OP" -confname "$CONFIGSET_CONFNAME" -confdir "$CONFIGSET_CONFDIR" -zkHost "$ZK_HOST" + ;; + rm) + if [ -z "$ZK_SRC" ]; then + print_short_zk_usage "Zookeeper path to remove must be specified when using the 'rm' command" + fi + run_tool "$ZK_OP" -path "$ZK_SRC" -zkHost "$ZK_HOST" -recurse "$ZK_RECURSE" + ;; + mv) + run_tool "$ZK_OP" -src "$ZK_SRC" -dst "$ZK_DST" -zkHost "$ZK_HOST" + ;; + cp) + run_tool "$ZK_OP" -src "$ZK_SRC" -dst "$ZK_DST" -zkHost "$ZK_HOST" -recurse "$ZK_RECURSE" + ;; + ls) + if [ -z "$ZK_SRC" ]; then + print_short_zk_usage "Zookeeper path to list must be specified when using the 'ls' command" + fi + run_tool "$ZK_OP" -path "$ZK_SRC" -recurse "$ZK_RECURSE" -zkHost "$ZK_HOST" + ;; + *) + print_short_zk_usage "Unrecognized Zookeeper operation $ZK_OP" + ;; + esac + + exit $? +fi + +# verify the command given is supported +if [ "$SCRIPT_CMD" != "stop" ] && [ "$SCRIPT_CMD" != "start" ] && [ "$SCRIPT_CMD" != "restart" ] && [ "$SCRIPT_CMD" != "status" ]; then + print_usage "" "$SCRIPT_CMD is not a valid command!" + exit 1 +fi + +# Run in foreground (default is to run in the background) +FG="false" +noprompt=false +SOLR_OPTS=($SOLR_OPTS) +PASS_TO_RUN_EXAMPLE= + +if [ $# -gt 0 ]; then + while true; do + case "$1" in + -c|-cloud) + SOLR_MODE="solrcloud" + PASS_TO_RUN_EXAMPLE+=" -c" + shift + ;; + -d|-dir) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Server directory is required when using the $1 option!" + exit 1 + fi + + if [[ "$2" == "." || "$2" == "./" || "$2" == ".." || "$2" == "../" ]]; then + SOLR_SERVER_DIR="$(pwd)/$2" + else + # see if the arg value is relative to the tip vs full path + if [[ "$2" != /* ]] && [[ -d "$SOLR_TIP/$2" ]]; then + SOLR_SERVER_DIR="$SOLR_TIP/$2" + else + SOLR_SERVER_DIR="$2" + fi + fi + # resolve it to an absolute path + SOLR_SERVER_DIR="$(cd "$SOLR_SERVER_DIR"; pwd)" + shift 2 + ;; + -s|-solr.home) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Solr home directory is required when using the $1 option!" + exit 1 + fi + + SOLR_HOME="$2" + shift 2 + ;; + -e|-example) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Example name is required when using the $1 option!" + exit 1 + fi + EXAMPLE="$2" + shift 2 + ;; + -f|-foreground) + FG="true" + shift + ;; + -h|-host) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Hostname is required when using the $1 option!" + exit 1 + fi + SOLR_HOST="$2" + PASS_TO_RUN_EXAMPLE+=" -h $SOLR_HOST" + shift 2 + ;; + -m|-memory) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Memory setting is required when using the $1 option!" + exit 1 + fi + SOLR_HEAP="$2" + PASS_TO_RUN_EXAMPLE+=" -m $SOLR_HEAP" + shift 2 + ;; + -p|-port) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Port number is required when using the $1 option!" + exit 1 + fi + SOLR_PORT="$2" + PASS_TO_RUN_EXAMPLE+=" -p $SOLR_PORT" + shift 2 + ;; + -z|-zkhost) + if [[ -z "$2" || "${2:0:1}" == "-" ]]; then + print_usage "$SCRIPT_CMD" "Zookeeper connection string is required when using the $1 option!" + exit 1 + fi + ZK_HOST="$2" + SOLR_MODE="solrcloud" + PASS_TO_RUN_EXAMPLE+=" -z $ZK_HOST" + shift 2 + ;; + -a|-addlopts) + ADDITIONAL_CMD_OPTS="$2" + PASS_TO_RUN_EXAMPLE+=" -a \"$ADDITIONAL_CMD_OPTS\"" + shift 2 + ;; + -k|-key) + STOP_KEY="$2" + shift 2 + ;; + -help|-usage) + print_usage "$SCRIPT_CMD" + exit 0 + ;; + -noprompt) + noprompt=true + PASS_TO_RUN_EXAMPLE+=" -noprompt" + shift + ;; + -V|-verbose) + verbose=true + PASS_TO_RUN_EXAMPLE+=" --verbose" + shift + ;; + -all) + stop_all=true + shift + ;; + --) + shift + break + ;; + *) + if [ "${1:0:2}" == "-D" ]; then + # pass thru any opts that begin with -D (java system props) + SOLR_OPTS+=("$1") + PASS_TO_RUN_EXAMPLE+=" $1" + shift + else + if [ "$1" != "" ]; then + print_usage "$SCRIPT_CMD" "$1 is not supported by this script" + exit 1 + else + break # out-of-args, stop looping + fi + fi + ;; + esac + done +fi + +if [ -z "$SOLR_SERVER_DIR" ]; then + SOLR_SERVER_DIR="$DEFAULT_SERVER_DIR" +fi + +if [ ! -e "$SOLR_SERVER_DIR" ]; then + echo -e "\nSolr server directory $SOLR_SERVER_DIR not found!\n" + exit 1 +fi + +if [[ "$FG" == 'true' && "$EXAMPLE" != "" ]]; then + FG='false' + echo -e "\nWARNING: Foreground mode (-f) not supported when running examples.\n" +fi + +# +# If the user specified an example to run, invoke the run_example tool (Java app) and exit +# otherwise let this script proceed to process the user request +# +if [ -n "$EXAMPLE" ] && [ "$SCRIPT_CMD" == "start" ]; then + run_tool run_example -e $EXAMPLE -d "$SOLR_SERVER_DIR" -urlScheme $SOLR_URL_SCHEME $PASS_TO_RUN_EXAMPLE + exit $? +fi + +############# start/stop logic below here ################ + +if $verbose ; then + echo "Using Solr root directory: $SOLR_TIP" + echo "Using Java: $JAVA" + "$JAVA" -version +fi + +if [ "$SOLR_HOST" != "" ]; then + SOLR_HOST_ARG=("-Dhost=$SOLR_HOST") +else + SOLR_HOST_ARG=() +fi + +if [ -z "$STOP_KEY" ]; then + STOP_KEY='solrrocks' +fi + +# stop all if no port specified +if [[ "$SCRIPT_CMD" == "stop" && -z "$SOLR_PORT" ]]; then + if $stop_all; then + none_stopped=true + find "$SOLR_PID_DIR" -name "solr-*.pid" -type f | while read PIDF + do + NEXT_PID=`cat "$PIDF"` + port=`jetty_port "$NEXT_PID"` + if [ "$port" != "" ]; then + stop_solr "$SOLR_SERVER_DIR" "$port" "$STOP_KEY" "$NEXT_PID" + none_stopped=false + fi + rm -f "$PIDF" + done + # TODO: none_stopped doesn't get reflected across the subshell + # This can be uncommented once we find a clean way out of it + # if $none_stopped; then + # echo -e "\nNo Solr nodes found to stop.\n" + # fi + else + # not stopping all and don't have a port, but if we can find the pid file for the default port 8983, then use that + none_stopped=true + numSolrs=`find "$SOLR_PID_DIR" -name "solr-*.pid" -type f | wc -l | tr -d ' '` + if [ $numSolrs -eq 1 ]; then + # only do this if there is only 1 node running, otherwise they must provide the -p or -all + PID="$(cat "$(find "$SOLR_PID_DIR" -name "solr-*.pid" -type f)")" + CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $PID | sort -r | tr -d ' '` + if [ "$CHECK_PID" != "" ]; then + port=`jetty_port "$CHECK_PID"` + if [ "$port" != "" ]; then + stop_solr "$SOLR_SERVER_DIR" "$port" "$STOP_KEY" "$CHECK_PID" + none_stopped=false + fi + fi + fi + + if $none_stopped; then + if [ $numSolrs -gt 0 ]; then + echo -e "\nFound $numSolrs Solr nodes running! Must either specify a port using -p or -all to stop all Solr nodes on this host.\n" + else + echo -e "\nNo Solr nodes found to stop.\n" + fi + exit 1 + fi + fi + exit +fi + +if [ -z "$SOLR_PORT" ]; then + SOLR_PORT=8983 +fi + +if [ -z "$STOP_PORT" ]; then + STOP_PORT=`expr $SOLR_PORT - 1000` +fi + +if [[ "$SCRIPT_CMD" == "start" ]]; then + # see if Solr is already running + SOLR_PID=`solr_pid_by_port "$SOLR_PORT"` + + if [ -z "$SOLR_PID" ]; then + # not found using the pid file ... but use ps to ensure not found + SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r` + fi + + if [ "$SOLR_PID" != "" ]; then + echo -e "\nPort $SOLR_PORT is already being used by another process (pid: $SOLR_PID)\nPlease choose a different port using the -p option.\n" + exit 1 + fi +else + # either stop or restart + # see if Solr is already running + SOLR_PID=`solr_pid_by_port "$SOLR_PORT"` + if [ -z "$SOLR_PID" ]; then + # not found using the pid file ... but use ps to ensure not found + SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r` + fi + if [ "$SOLR_PID" != "" ]; then + stop_solr "$SOLR_SERVER_DIR" "$SOLR_PORT" "$STOP_KEY" "$SOLR_PID" + else + if [ "$SCRIPT_CMD" == "stop" ]; then + echo -e "No process found for Solr node running on port $SOLR_PORT" + exit 1 + fi + fi +fi + +if [ -z "$SOLR_HOME" ]; then + SOLR_HOME="$SOLR_SERVER_DIR/solr" +else + if [[ $SOLR_HOME != /* ]] && [[ -d "$SOLR_SERVER_DIR/$SOLR_HOME" ]]; then + SOLR_HOME="$SOLR_SERVER_DIR/$SOLR_HOME" + SOLR_PID_DIR="$SOLR_HOME" + elif [[ $SOLR_HOME != /* ]] && [[ -d "`pwd`/$SOLR_HOME" ]]; then + SOLR_HOME="$(pwd)/$SOLR_HOME" + fi +fi + +# This is quite hacky, but examples rely on a different log4j.properties +# so that we can write logs for examples to $SOLR_HOME/../logs +if [ -z "$SOLR_LOGS_DIR" ]; then + SOLR_LOGS_DIR="$SOLR_SERVER_DIR/logs" +fi +EXAMPLE_DIR="$SOLR_TIP/example" +if [ "${SOLR_HOME:0:${#EXAMPLE_DIR}}" = "$EXAMPLE_DIR" ]; then + LOG4J_PROPS="$EXAMPLE_DIR/resources/log4j.properties" + SOLR_LOGS_DIR="$SOLR_HOME/../logs" +fi + +LOG4J_CONFIG=() +if [ -n "$LOG4J_PROPS" ]; then + LOG4J_CONFIG+=("-Dlog4j.configuration=file:$LOG4J_PROPS") +fi + +if [ "$SCRIPT_CMD" == "stop" ]; then + # already stopped, script is done. + exit 0 +fi + +# NOTE: If the script gets to here, then it is starting up a Solr node. + +if [ ! -e "$SOLR_HOME" ]; then + echo -e "\nSolr home directory $SOLR_HOME not found!\n" + exit 1 +fi + +# backup the log files before starting +if [ -f "$SOLR_LOGS_DIR/solr.log" ]; then + if $verbose ; then + echo "Backing up $SOLR_LOGS_DIR/solr.log" + fi + mv "$SOLR_LOGS_DIR/solr.log" "$SOLR_LOGS_DIR/solr_log_$(date +"%Y%m%d_%H%M")" +fi + +if [ -f "$SOLR_LOGS_DIR/solr_gc.log" ]; then + if $verbose ; then + echo "Backing up $SOLR_LOGS_DIR/solr_gc.log" + fi + mv "$SOLR_LOGS_DIR/solr_gc.log" "$SOLR_LOGS_DIR/solr_gc_log_$(date +"%Y%m%d_%H%M")" +fi + +java_ver_out=`echo "$("$JAVA" -version 2>&1)"` +JAVA_VERSION=`echo $java_ver_out | grep "java version" | awk '{ print substr($3, 2, length($3)-2); }'` +JAVA_VENDOR="Oracle" +if [ "`echo $java_ver_out | grep -i "IBM J9"`" != "" ]; then + JAVA_VENDOR="IBM J9" +fi + +# if verbose gc logging enabled, setup the location of the log file +if [ "$GC_LOG_OPTS" != "" ]; then + gc_log_flag="-Xloggc" + if [ "$JAVA_VENDOR" == "IBM J9" ]; then + gc_log_flag="-Xverbosegclog" + fi + GC_LOG_OPTS=($GC_LOG_OPTS "$gc_log_flag:$SOLR_LOGS_DIR/solr_gc.log") +else + GC_LOG_OPTS=() +fi + +# If ZK_HOST is defined, the assume SolrCloud mode +if [[ -n "$ZK_HOST" ]]; then + SOLR_MODE="solrcloud" +fi + +if [ "$SOLR_MODE" == 'solrcloud' ]; then + if [ -z "$ZK_CLIENT_TIMEOUT" ]; then + ZK_CLIENT_TIMEOUT="15000" + fi + + CLOUD_MODE_OPTS=("-DzkClientTimeout=$ZK_CLIENT_TIMEOUT") + + if [ "$ZK_HOST" != "" ]; then + CLOUD_MODE_OPTS+=("-DzkHost=$ZK_HOST") + else + if $verbose ; then + echo "Configuring SolrCloud to launch an embedded Zookeeper using -DzkRun" + fi + + CLOUD_MODE_OPTS+=('-DzkRun') + fi + + # and if collection1 needs to be bootstrapped + if [ -e "$SOLR_HOME/collection1/core.properties" ]; then + CLOUD_MODE_OPTS+=('-Dbootstrap_confdir=./solr/collection1/conf' '-Dcollection.configName=myconf' '-DnumShards=1') + fi + +else + if [ ! -e "$SOLR_HOME/solr.xml" ]; then + echo -e "\nSolr home directory $SOLR_HOME must contain a solr.xml file!\n" + exit 1 + fi +fi + +# These are useful for attaching remote profilers like VisualVM/JConsole +if [ "$ENABLE_REMOTE_JMX_OPTS" == "true" ]; then + + if [ -z "$RMI_PORT" ]; then + RMI_PORT="1$SOLR_PORT" + fi + + REMOTE_JMX_OPTS=('-Dcom.sun.management.jmxremote' \ + '-Dcom.sun.management.jmxremote.local.only=false' \ + '-Dcom.sun.management.jmxremote.ssl=false' \ + '-Dcom.sun.management.jmxremote.authenticate=false' \ + "-Dcom.sun.management.jmxremote.port=$RMI_PORT" \ + "-Dcom.sun.management.jmxremote.rmi.port=$RMI_PORT") + + # if the host is set, then set that as the rmi server hostname + if [ "$SOLR_HOST" != "" ]; then + REMOTE_JMX_OPTS+=("-Djava.rmi.server.hostname=$SOLR_HOST") + fi +else + REMOTE_JMX_OPTS=() +fi + +JAVA_MEM_OPTS=() +if [ -z "$SOLR_HEAP" ] && [ -n "$SOLR_JAVA_MEM" ]; then + JAVA_MEM_OPTS=($SOLR_JAVA_MEM) +else + SOLR_HEAP="${SOLR_HEAP:-512m}" + JAVA_MEM_OPTS=("-Xms$SOLR_HEAP" "-Xmx$SOLR_HEAP") +fi + +if [ -z "$SOLR_TIMEZONE" ]; then + SOLR_TIMEZONE='UTC' +fi + +# Launches Solr in foreground/background depending on parameters +function launch_solr() { + + run_in_foreground="$1" + stop_port="$STOP_PORT" + + SOLR_ADDL_ARGS="$2" + + GC_TUNE=($GC_TUNE) + # deal with Java version specific GC and other flags + if [ "${JAVA_VERSION:0:3}" == "1.7" ]; then + # Specific Java version hacking + GC_TUNE+=('-XX:CMSFullGCsBeforeCompaction=1' '-XX:CMSTriggerPermRatio=80') + if [ "$JAVA_VENDOR" != "IBM J9" ]; then + JAVA_MINOR_VERSION=${JAVA_VERSION:(-2)} + if [[ $JAVA_MINOR_VERSION -ge 40 && $JAVA_MINOR_VERSION -le 51 ]]; then + GC_TUNE+=('-XX:-UseSuperWord') + echo -e "\nWARNING: Java version $JAVA_VERSION has known bugs with Lucene and requires the -XX:-UseSuperWord flag. Please consider upgrading your JVM.\n" + fi + fi + fi + + # If SSL-related system props are set, add them to SOLR_OPTS + if [ -n "$SOLR_SSL_OPTS" ]; then + # If using SSL and solr.jetty.https.port not set explicitly, use the jetty.port + SSL_PORT_PROP="-Dsolr.jetty.https.port=$SOLR_PORT" + SOLR_OPTS+=($SOLR_SSL_OPTS "$SSL_PORT_PROP") + fi + + # If authentication system props are set, add them to SOLR_OPTS + if [ -n "$AUTHC_OPTS" ]; then + SOLR_OPTS+=($AUTHC_OPTS) + fi + + if $verbose ; then + echo -e "\nStarting Solr using the following settings:" + echo -e " JAVA = $JAVA" + echo -e " SOLR_SERVER_DIR = $SOLR_SERVER_DIR" + echo -e " SOLR_HOME = $SOLR_HOME" + echo -e " SOLR_HOST = $SOLR_HOST" + echo -e " SOLR_PORT = $SOLR_PORT" + echo -e " STOP_PORT = $STOP_PORT" + echo -e " JAVA_MEM_OPTS = ${JAVA_MEM_OPTS[@]}" + echo -e " GC_TUNE = ${GC_TUNE[@]}" + echo -e " GC_LOG_OPTS = ${GC_LOG_OPTS[@]}" + echo -e " SOLR_TIMEZONE = $SOLR_TIMEZONE" + + if [ "$SOLR_MODE" == "solrcloud" ]; then + echo -e " CLOUD_MODE_OPTS = ${CLOUD_MODE_OPTS[@]}" + fi + + if [ "$SOLR_OPTS" != "" ]; then + echo -e " SOLR_OPTS = ${SOLR_OPTS[@]}" + fi + + if [ "$SOLR_ADDL_ARGS" != "" ]; then + echo -e " SOLR_ADDL_ARGS = $SOLR_ADDL_ARGS" + fi + + if [ "$ENABLE_REMOTE_JMX_OPTS" == "true" ]; then + echo -e " RMI_PORT = $RMI_PORT" + echo -e " REMOTE_JMX_OPTS = ${REMOTE_JMX_OPTS[@]}" + fi + echo -e "\n" + fi + + # need to launch solr from the server dir + cd "$SOLR_SERVER_DIR" + + if [ ! -e "$SOLR_SERVER_DIR/start.jar" ]; then + echo -e "\nERROR: start.jar file not found in $SOLR_SERVER_DIR!\nPlease check your -d parameter to set the correct Solr server directory.\n" + exit 1 + fi + + SOLR_START_OPTS=('-server' "${JAVA_MEM_OPTS[@]}" "${GC_TUNE[@]}" "${GC_LOG_OPTS[@]}" \ + "${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" \ + "-Djetty.port=$SOLR_PORT" "-DSTOP.PORT=$stop_port" "-DSTOP.KEY=$STOP_KEY" \ + "${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" \ + "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.install.dir=$SOLR_TIP" \ + "${LOG4J_CONFIG[@]}" "${SOLR_OPTS[@]}") + + if [ "$SOLR_MODE" == "solrcloud" ]; then + IN_CLOUD_MODE=" in SolrCloud mode" + fi + + mkdir -p "$SOLR_LOGS_DIR" + + if [ "$run_in_foreground" == "true" ]; then + echo -e "\nStarting Solr$IN_CLOUD_MODE on port $SOLR_PORT from $SOLR_SERVER_DIR\n" + exec "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -jar start.jar "${SOLR_JETTY_CONFIG[@]}" + else + # run Solr in the background + nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS \ + "-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" \ + -jar start.jar "${SOLR_JETTY_CONFIG[@]}" \ + 1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid" + + # no lsof on cygwin though + if hash lsof 2>/dev/null ; then # hash returns true if lsof is on the path + echo -n "Waiting up to 30 seconds to see Solr running on port $SOLR_PORT" + # Launch in a subshell to show the spinner + (loops=0 + while true + do + running=`lsof -PniTCP:$SOLR_PORT -sTCP:LISTEN` + if [ -z "$running" ]; then + if [ $loops -lt 6 ]; then + sleep 5 + loops=$[$loops+1] + else + echo -e "Still not seeing Solr listening on $SOLR_PORT after 30 seconds!" + tail -30 "$SOLR_LOGS_DIR/solr.log" + exit # subshell! + fi + else + SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r` + echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n" + exit # subshell! + fi + done) & + spinner $! + else + echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT." + sleep 10 + SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r` + echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n" + return; + fi + fi +} + +launch_solr "$FG" "$ADDITIONAL_CMD_OPTS" + +exit $? diff --git a/KeywordSearch/release/solr/bin/solr.cmd b/KeywordSearch/release/solr/bin/solr.cmd new file mode 100644 index 0000000000..e9c8f84c9e --- /dev/null +++ b/KeywordSearch/release/solr/bin/solr.cmd @@ -0,0 +1,1506 @@ +@REM +@REM Licensed to the Apache Software Foundation (ASF) under one or more +@REM contributor license agreements. See the NOTICE file distributed with +@REM this work for additional information regarding copyright ownership. +@REM The ASF licenses this file to You under the Apache License, Version 2.0 +@REM (the "License"); you may not use this file except in compliance with +@REM the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. + +@echo off + +IF "%OS%"=="Windows_NT" setlocal enabledelayedexpansion enableextensions + +set "PASS_TO_RUN_EXAMPLE=" + +REM Determine top-level Solr directory +set SDIR=%~dp0 +IF "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1% +set SOLR_TIP=%SDIR%\.. +pushd %SOLR_TIP% +set SOLR_TIP=%CD% +popd + +REM Used to report errors before exiting the script +set SCRIPT_ERROR= +set NO_USER_PROMPT=0 + +REM Allow user to import vars from an include file +REM vars set in the include file can be overridden with +REM command line args +IF "%SOLR_INCLUDE%"=="" set "SOLR_INCLUDE=%SOLR_TIP%\bin\solr.in.cmd" +IF EXIST "%SOLR_INCLUDE%" CALL "%SOLR_INCLUDE%" + +REM Select HTTP OR HTTPS related configurations +set SOLR_URL_SCHEME=http +set "SOLR_JETTY_CONFIG=--module=http" +set "SOLR_SSL_OPTS= " +IF DEFINED SOLR_SSL_KEY_STORE ( + set "SOLR_JETTY_CONFIG=--module=https" + set SOLR_URL_SCHEME=https + set "SCRIPT_ERROR=Solr server directory %SOLR_SERVER_DIR% not found!" + set "SOLR_SSL_OPTS=-Dsolr.jetty.keystore=%SOLR_SSL_KEY_STORE% -Dsolr.jetty.keystore.password=%SOLR_SSL_KEY_STORE_PASSWORD% -Dsolr.jetty.truststore=%SOLR_SSL_TRUST_STORE% -Dsolr.jetty.truststore.password=%SOLR_SSL_TRUST_STORE_PASSWORD% -Dsolr.jetty.ssl.needClientAuth=%SOLR_SSL_NEED_CLIENT_AUTH% -Dsolr.jetty.ssl.wantClientAuth=%SOLR_SSL_WANT_CLIENT_AUTH%" + IF DEFINED SOLR_SSL_CLIENT_KEY_STORE ( + set "SOLR_SSL_OPTS=%SOLR_SSL_OPTS% -Djavax.net.ssl.keyStore=%SOLR_SSL_CLIENT_KEY_STORE% -Djavax.net.ssl.keyStorePassword=%SOLR_SSL_CLIENT_KEY_STORE_PASSWORD% -Djavax.net.ssl.trustStore=%SOLR_SSL_CLIENT_TRUST_STORE% -Djavax.net.ssl.trustStorePassword=%SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD%" + ) ELSE ( + set "SOLR_SSL_OPTS=%SOLR_SSL_OPTS% -Djavax.net.ssl.keyStore=%SOLR_SSL_KEY_STORE% -Djavax.net.ssl.keyStorePassword=%SOLR_SSL_KEY_STORE_PASSWORD% -Djavax.net.ssl.trustStore=%SOLR_SSL_TRUST_STORE% -Djavax.net.ssl.trustStorePassword=%SOLR_SSL_TRUST_STORE_PASSWORD%" + ) +) ELSE ( + set SOLR_SSL_OPTS= +) + +REM Set the SOLR_TOOL_HOST variable for use when connecting to a running Solr instance +IF NOT "%SOLR_HOST%"=="" ( + set "SOLR_TOOL_HOST=%SOLR_HOST%" +) ELSE ( + set "SOLR_TOOL_HOST=localhost" +) + +REM Verify Java is available +IF DEFINED SOLR_JAVA_HOME set "JAVA_HOME=%SOLR_JAVA_HOME%" +REM Try to detect JAVA_HOME from the registry +IF NOT DEFINED JAVA_HOME ( + FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment" /v CurrentVersion') DO set CurVer=%%B + FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment\!CurVer!" /v JavaHome') DO ( + set "JAVA_HOME=%%B" + ) +) +IF NOT DEFINED JAVA_HOME goto need_java_home +set JAVA_HOME=%JAVA_HOME:"=% +IF %JAVA_HOME:~-1%==\ SET JAVA_HOME=%JAVA_HOME:~0,-1% +IF NOT EXIST "%JAVA_HOME%\bin\java.exe" ( + set "SCRIPT_ERROR=java.exe not found in %JAVA_HOME%\bin. Please set JAVA_HOME to a valid JRE / JDK directory." + goto err +) +set "JAVA=%JAVA_HOME%\bin\java" +CALL :resolve_java_info +IF !JAVA_MAJOR_VERSION! LSS 8 ( + set "SCRIPT_ERROR=Java 1.8 or later is required to run Solr. Current Java version is: !JAVA_VERSION_INFO!" + goto err +) + +set "DEFAULT_SERVER_DIR=%SOLR_TIP%\server" + +set FIRST_ARG=%1 + +IF [%1]==[] goto usage + +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="-h" goto usage +IF "%1"=="--help" goto usage +IF "%1"=="/?" goto usage +IF "%1"=="-i" goto get_info +IF "%1"=="-info" goto get_info +IF "%1"=="status" goto get_info +IF "%1"=="version" goto get_version +IF "%1"=="-v" goto get_version +IF "%1"=="-version" goto get_version + +REM Only allow the command to be the first argument, assume start if not supplied +IF "%1"=="start" goto set_script_cmd +IF "%1"=="stop" goto set_script_cmd +IF "%1"=="restart" goto set_script_cmd +IF "%1"=="healthcheck" ( + REM healthcheck uses different arg parsing strategy + set SCRIPT_CMD=healthcheck + SHIFT + goto parse_healthcheck_args +) +IF "%1"=="create" ( + set SCRIPT_CMD=create + SHIFT + goto parse_create_args +) +IF "%1"=="create_core" ( + set SCRIPT_CMD=create_core + SHIFT + goto parse_create_args +) +IF "%1"=="create_collection" ( + set SCRIPT_CMD=create_collection + SHIFT + goto parse_create_args +) +IF "%1"=="delete" ( + set SCRIPT_CMD=delete + SHIFT + goto parse_delete_args +) +IF "%1"=="zk" ( + set SCRIPT_CMD=zk + SHIFT + set ZK_RECURSE=false + goto parse_zk_args +) + +goto parse_args + +:usage +IF NOT "%SCRIPT_ERROR%"=="" ECHO %SCRIPT_ERROR% +IF [%FIRST_ARG%]==[] goto script_usage +IF "%FIRST_ARG%"=="-help" goto script_usage +IF "%FIRST_ARG%"=="-usage" goto script_usage +IF "%FIRST_ARG%"=="-h" goto script_usage +IF "%FIRST_ARG%"=="--help" goto script_usage +IF "%FIRST_ARG%"=="/?" goto script_usage +IF "%SCRIPT_CMD%"=="start" goto start_usage +IF "%SCRIPT_CMD%"=="restart" goto start_usage +IF "%SCRIPT_CMD%"=="stop" goto stop_usage +IF "%SCRIPT_CMD%"=="healthcheck" goto healthcheck_usage +IF "%SCRIPT_CMD%"=="create" goto create_usage +IF "%SCRIPT_CMD%"=="create_core" goto create_core_usage +IF "%SCRIPT_CMD%"=="create_collection" goto create_collection_usage +IF "%SCRIPT_CMD%"=="delete" goto delete_usage +IF "%SCRIPT_CMD%"=="zk" goto zk_usage +goto done + +:script_usage +@echo. +@echo Usage: solr COMMAND OPTIONS +@echo where COMMAND is one of: start, stop, restart, healthcheck, create, create_core, create_collection, delete, version, zk +@echo. +@echo Standalone server example (start Solr running in the background on port 8984): +@echo. +@echo solr start -p 8984 +@echo. +@echo SolrCloud example (start Solr running in SolrCloud mode using localhost:2181 to connect to Zookeeper, with 1g max heap size and remote Java debug options enabled): +@echo. +@echo solr start -c -m 1g -z localhost:2181 -a "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044" +@echo. +@echo Pass -help after any COMMAND to see command-specific usage information, +@echo such as: solr start -help or solr stop -help +@echo. +goto done + +:start_usage +@echo. +@echo Usage: solr %SCRIPT_CMD% [-f] [-c] [-h hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-a "additional-options"] [-V] +@echo. +@echo -f Start Solr in foreground; default starts Solr in the background +@echo and sends stdout / stderr to solr-PORT-console.log +@echo. +@echo -c or -cloud Start Solr in SolrCloud mode; if -z not supplied, an embedded Zookeeper +@echo instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983 +@echo. +@echo -h host Specify the hostname for this Solr instance +@echo. +@echo -p port Specify the port to start the Solr HTTP listener on; default is 8983 +@echo. +@echo -d dir Specify the Solr server directory; defaults to example +@echo. +@echo -z zkHost Zookeeper connection string; only used when running in SolrCloud mode using -c +@echo To launch an embedded Zookeeper instance, don't pass this parameter. +@echo. +@echo -m memory Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g +@echo results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m +@echo. +@echo -s dir Sets the solr.solr.home system property; Solr will create core directories under +@echo this directory. This allows you to run multiple Solr instances on the same host +@echo while reusing the same server directory set using the -d parameter. If set, the +@echo specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper. +@echo This parameter is ignored when running examples (-e), as the solr.solr.home depends +@echo on which example is run. The default value is server/solr. +@echo. +@echo -e example Name of the example to run; available examples: +@echo cloud: SolrCloud example +@echo techproducts: Comprehensive example illustrating many of Solr's core capabilities +@echo dih: Data Import Handler +@echo schemaless: Schema-less example +@echo. +@echo -a opts Additional parameters to pass to the JVM when starting Solr, such as to setup +@echo Java debug options. For example, to enable a Java debugger to attach to the Solr JVM +@echo you could pass: -a "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983" +@echo In most cases, you should wrap the additional parameters in double quotes. +@echo. +@echo -noprompt Don't prompt for input; accept all defaults when running examples that accept user input +@echo. +@echo -V Verbose messages from this script +@echo. +goto done + +:stop_usage +@echo. +@echo Usage: solr stop [-k key] [-p port] +@echo. +@echo -k key Stop key; default is solrrocks +@echo. +@echo -p port Specify the port the Solr HTTP listener is bound to +@echo. +@echo -all Find and stop all running Solr servers on this host +@echo. +goto done + +:healthcheck_usage +@echo. +@echo Usage: solr healthcheck [-c collection] [-z zkHost] +@echo. +@echo -c collection Collection to run healthcheck against. +@echo. +@echo -z zkHost Zookeeper connection string; default is localhost:9983 +@echo. +goto done + +:create_usage +echo. +echo Usage: solr create [-c name] [-d confdir] [-n confname] [-shards #] [-replicationFactor #] [-p port] +echo. +echo Create a core or collection depending on whether Solr is running in standalone (core) or SolrCloud +echo mode (collection). In other words, this action detects which mode Solr is running in, and then takes +echo the appropriate action (either create_core or create_collection). For detailed usage instructions, do: +echo. +echo bin\solr create_core -help +echo. +echo or +echo. +echo bin\solr create_collection -help +echo. +goto done + +:delete_usage +echo. +echo Usage: solr delete [-c name] [-deleteConfig boolean] [-p port] +echo. +echo Deletes a core or collection depending on whether Solr is running in standalone (core) or SolrCloud +echo mode (collection). If you're deleting a collection in SolrCloud mode, the default behavior is to also +echo delete the configuration directory from Zookeeper so long as it is not being used by another collection. +echo You can override this behavior by passing -deleteConfig false when running this command. +echo. +echo -c name Name of core to create +echo. +echo -deleteConfig boolean Delete the configuration directory from Zookeeper; default is true +echo. +echo -p port Port of a local Solr instance where you want to create the new core +echo If not specified, the script will search the local system for a running +echo Solr instance and will use the port of the first server it finds. +echo. +goto done + +:create_core_usage +echo. +echo Usage: solr create_core [-c name] [-d confdir] [-p port] +echo. +echo -c name Name of core to create +echo. +echo -d confdir Configuration directory to copy when creating the new core, built-in options are: +echo. +echo basic_configs: Minimal Solr configuration +echo data_driven_schema_configs: Managed schema with field-guessing support enabled +echo sample_techproducts_configs: Example configuration with many optional features enabled to +echo demonstrate the full power of Solr +echo. +echo If not specified, default is: data_driven_schema_configs +echo. +echo Alternatively, you can pass the path to your own configuration directory instead of using +echo one of the built-in configurations, such as: bin\solr create_core -c mycore -d c:/tmp/myconfig +echo. +echo -p port Port of a local Solr instance where you want to create the new core +echo If not specified, the script will search the local system for a running +echo Solr instance and will use the port of the first server it finds. +echo. +goto done + +:create_collection_usage +echo. +echo Usage: solr create_collection [-c name] [-d confdir] [-n confname] [-shards #] [-replicationFactor #] [-p port] +echo. +echo -c name Name of collection to create +echo. +echo -d confdir Configuration directory to copy when creating the new collection, built-in options are: +echo. +echo basic_configs: Minimal Solr configuration +echo data_driven_schema_configs: Managed schema with field-guessing support enabled +echo sample_techproducts_configs: Example configuration with many optional features enabled to +echo demonstrate the full power of Solr +echo. +echo If not specified, default is: data_driven_schema_configs +echo. +echo Alternatively, you can pass the path to your own configuration directory instead of using +echo one of the built-in configurations, such as: bin\solr create_collection -c mycoll -d c:/tmp/myconfig +echo. +echo By default the script will upload the specified confdir directory into Zookeeper using the same +echo name as the collection (-c) option. Alternatively, if you want to reuse an existing directory +echo or create a confdir in Zookeeper that can be shared by multiple collections, use the -n option +echo. +echo -n configName Name the configuration directory in Zookeeper; by default, the configuration +echo will be uploaded to Zookeeper using the collection name (-c), but if you want +echo to use an existing directory or override the name of the configuration in +echo Zookeeper, then use the -c option. +echo. +echo -shards # Number of shards to split the collection into +echo. +echo -replicationFactor # Number of copies of each document in the collection +echo. +echo -p port Port of a local Solr instance where you want to create the new collection +echo If not specified, the script will search the local system for a running +echo Solr instance and will use the port of the first server it finds. +echo. +goto done + +:zk_usage +set ZK_FULL=true +goto zk_short_usage +:zk_full_usage +echo Be sure to check the Solr logs in case of errors. +echo. +echo -z zkHost Optional Zookeeper connection string for all commands. If specified it +echo overrides the 'ZK_HOST=...'' defined in solr.in.sh. +echo. +echo upconfig uploads a configset from the local machine to Zookeeper. (Backcompat: -upconfig) +echo. +echo downconfig downloads a configset from Zookeeper to the local machine. (Backcompat: -downconfig) +echo. +echo -n configName Name of the configset in Zookeeper that will be the destination of +echo 'upconfig' and the source for 'downconfig'. +echo. +echo -d confdir The local directory the configuration will be uploaded from for +echo 'upconfig' or downloaded to for 'downconfig'. If 'confdir' is a child of +echo ...solr/server/solr/configsets' then the configs will be copied from/to +echo that directory. Otherwise it is interpreted as a simple local path. +echo. +echo cp copies files or folders to/from Zookeeper or Zokeeper -^> Zookeeper +echo -r Recursively copy ^ to ^. Command will fail if ^ has children and +echo -r is not specified. Optional +echo. +echo. ^, ^ : [file:][/]path/to/local/file or zk:/path/to/zk/node +echo NOTE: ^ and ^ may both be Zookeeper resources prefixed by 'zk:' +echo When ^ is a zk resource, ^ may be '.' +echo If ^ ends with '/', then ^ will be a local folder or parent znode and the last +echo element of the ^ path will be appended. +echo. +echo The 'file:' prefix is stripped, thus 'file:/' specifies an absolute local path and +echo 'file:somewhere' specifies a relative local path. All paths on Zookeeper are absolute +echo so the slash is required. +echo. +echo Zookeeper nodes CAN have data, so moving a single file to a parent znode +echo will overlay the data on the parent Znode so specifying the trailing slash +echo is important. +echo. +echo Wildcards are not supported +echo. +echo rm deletes files or folders on Zookeeper +echo -r Recursively delete if ^ is a directory. Command will fail if ^ +echo has children and -r is not specified. Optional +echo ^ : [zk:]/path/to/zk/node. ^ may not be the root ('/')" +echo. +echo mv moves (renames) znodes on Zookeeper +echo ^, ^ : Zookeeper nodes, the 'zk:' prefix is optional. +echo If ^ ends with '/', then ^ will be a parent znode +echo and the last element of the ^ path will be appended. +echo Zookeeper nodes CAN have data, so moving a single file to a parent znode +echo will overlay the data on the parent Znode so specifying the trailing slash +echo is important. +echo. +echo ls lists the znodes on Zookeeper +echo -r recursively descends the path listing all znodes. Optional +echo ^: The Zookeeper path to use as the root. +echo. +echo Only the node names are listed, not data +echo. +goto done + +:zk_short_usage +IF NOT "!ERROR_MSG!"=="" ( + echo ERROR: !ERROR_MSG! + echo. +) +echo Usage: solr zk upconfig^|downconfig -d ^ -n ^ [-z zkHost] +echo solr zk cp [-r] ^ ^ [-z zkHost] +echo solr zk rm [-r] ^ [-z zkHost] +echo solr zk mv ^ ^ [-z zkHost] +echo solr zk ls [-r] ^ [-z zkHost] +echo. +IF "%ZK_FULL%"=="true" ( + goto zk_full_usage +) ELSE ( + echo Type bin/solr zk -help for full usage help +) +goto done + + +REM Really basic command-line arg parsing +:parse_args + +set "arg=%~1" +set "firstTwo=%arg:~0,2%" +IF "%SCRIPT_CMD%"=="" set SCRIPT_CMD=start +IF [%1]==[] goto process_script_cmd +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +IF "%1"=="-f" goto set_foreground_mode +IF "%1"=="-foreground" goto set_foreground_mode +IF "%1"=="-V" goto set_verbose +IF "%1"=="-verbose" goto set_verbose +IF "%1"=="-c" goto set_cloud_mode +IF "%1"=="-cloud" goto set_cloud_mode +IF "%1"=="-d" goto set_server_dir +IF "%1"=="-dir" goto set_server_dir +IF "%1"=="-s" goto set_solr_home_dir +IF "%1"=="-solr.home" goto set_solr_home_dir +IF "%1"=="-e" goto set_example +IF "%1"=="-example" goto set_example +IF "%1"=="-h" goto set_host +IF "%1"=="-host" goto set_host +IF "%1"=="-m" goto set_memory +IF "%1"=="-memory" goto set_memory +IF "%1"=="-p" goto set_port +IF "%1"=="-port" goto set_port +IF "%1"=="-z" goto set_zookeeper +IF "%1"=="-zkhost" goto set_zookeeper +IF "%1"=="-a" goto set_addl_opts +IF "%1"=="-addlopts" goto set_addl_opts +IF "%1"=="-noprompt" goto set_noprompt +IF "%1"=="-k" goto set_stop_key +IF "%1"=="-key" goto set_stop_key +IF "%1"=="-all" goto set_stop_all +IF "%firstTwo%"=="-D" goto set_passthru +IF NOT "%1"=="" goto invalid_cmd_line +goto invalid_cmd_line + +:set_script_cmd +set SCRIPT_CMD=%1 +SHIFT +goto parse_args + +:set_foreground_mode +set FG=1 +SHIFT +goto parse_args + +:set_verbose +set verbose=1 +set "PASS_TO_RUN_EXAMPLE=--verbose !PASS_TO_RUN_EXAMPLE!" +SHIFT +goto parse_args + +:set_cloud_mode +set SOLR_MODE=solrcloud +SHIFT +goto parse_args + +:set_server_dir + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Directory name is required! + goto invalid_cmd_line +) +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected directory but found %2 instead! + goto invalid_cmd_line +) + +REM See if they are using a short-hand name relative from the Solr tip directory +IF EXIST "%SOLR_TIP%\%~2" ( + set "SOLR_SERVER_DIR=%SOLR_TIP%\%~2" +) ELSE ( + set "SOLR_SERVER_DIR=%~2" +) +SHIFT +SHIFT +goto parse_args + +:set_solr_home_dir + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Directory name is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected directory but found %2 instead! + goto invalid_cmd_line +) +set "SOLR_HOME=%~2" +SHIFT +SHIFT +goto parse_args + +:set_example + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Example name is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected example name but found %2 instead! + goto invalid_cmd_line +) + +set EXAMPLE=%~2 +SHIFT +SHIFT +goto parse_args + +:set_memory + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Memory setting is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected memory setting but found %2 instead! + goto invalid_cmd_line +) + +set SOLR_HEAP=%~2 +set "PASS_TO_RUN_EXAMPLE=-m %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_host +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Hostname is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected hostname but found %2 instead! + goto invalid_cmd_line +) + +set SOLR_HOST=%~2 +set "PASS_TO_RUN_EXAMPLE=-h %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_port +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Port is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected port but found %2 instead! + goto invalid_cmd_line +) + +set SOLR_PORT=%~2 +set "PASS_TO_RUN_EXAMPLE=-p %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_stop_key +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Stop key is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected stop key but found %2 instead! + goto invalid_cmd_line +) +set STOP_KEY=%~2 +SHIFT +SHIFT +goto parse_args + +:set_stop_all +set STOP_ALL=1 +SHIFT +goto parse_args + +:set_zookeeper + +set "arg=%~2" +IF "%arg%"=="" ( + set SCRIPT_ERROR=Zookeeper connection string is required! + goto invalid_cmd_line +) + +set firstChar=%arg:~0,1% +IF "%firstChar%"=="-" ( + set SCRIPT_ERROR=Expected Zookeeper connection string but found %2 instead! + goto invalid_cmd_line +) + +set "ZK_HOST=%~2" +set "PASS_TO_RUN_EXAMPLE=-z %~2 !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_addl_opts +set "arg=%~2" +set "SOLR_ADDL_ARGS=%~2" +SHIFT +SHIFT +goto parse_args + +:set_passthru +set "PASSTHRU=%~1=%~2" +IF NOT "%SOLR_OPTS%"=="" ( + set "SOLR_OPTS=%SOLR_OPTS% %PASSTHRU%" +) ELSE ( + set "SOLR_OPTS=%PASSTHRU%" +) +set "PASS_TO_RUN_EXAMPLE=%PASSTHRU% !PASS_TO_RUN_EXAMPLE!" +SHIFT +SHIFT +goto parse_args + +:set_noprompt +set NO_USER_PROMPT=1 +set "PASS_TO_RUN_EXAMPLE=-noprompt !PASS_TO_RUN_EXAMPLE!" + +SHIFT +goto parse_args + +REM Perform the requested command after processing args +:process_script_cmd + +IF "%verbose%"=="1" ( + CALL :safe_echo "Using Solr root directory: %SOLR_TIP%" + CALL :safe_echo "Using Java: %JAVA%" + "%JAVA%" -version + @echo. +) + +IF NOT "%SOLR_HOST%"=="" ( + set SOLR_HOST_ARG=-Dhost=%SOLR_HOST% +) ELSE ( + set SOLR_HOST_ARG= +) + +IF "%SOLR_SERVER_DIR%"=="" set "SOLR_SERVER_DIR=%DEFAULT_SERVER_DIR%" + +IF NOT EXIST "%SOLR_SERVER_DIR%" ( + set "SCRIPT_ERROR=Solr server directory %SOLR_SERVER_DIR% not found!" + goto err +) + +IF NOT "%EXAMPLE%"=="" goto run_example + +:start_solr +IF "%SOLR_HOME%"=="" set "SOLR_HOME=%SOLR_SERVER_DIR%\solr" +IF EXIST "%cd%\%SOLR_HOME%" set "SOLR_HOME=%cd%\%SOLR_HOME%" + +IF NOT EXIST "%SOLR_HOME%\" ( + IF EXIST "%SOLR_SERVER_DIR%\%SOLR_HOME%" ( + set "SOLR_HOME=%SOLR_SERVER_DIR%\%SOLR_HOME%" + ) ELSE ( + set "SCRIPT_ERROR=Solr home directory %SOLR_HOME% not found!" + goto err + ) +) + +IF "%STOP_KEY%"=="" set STOP_KEY=solrrocks + +@REM This is quite hacky, but examples rely on a different log4j.properties +@REM so that we can write logs for examples to %SOLR_HOME%\..\logs +set "SOLR_LOGS_DIR=%SOLR_SERVER_DIR%\logs" +set "EXAMPLE_DIR=%SOLR_TIP%\example" +set TMP=!SOLR_HOME:%EXAMPLE_DIR%=! +IF NOT "%TMP%"=="%SOLR_HOME%" ( + set "SOLR_LOGS_DIR=%SOLR_HOME%\..\logs" + set "LOG4J_CONFIG=file:%EXAMPLE_DIR%\resources\log4j.properties" +) + +set IS_RESTART=0 +IF "%SCRIPT_CMD%"=="restart" ( + IF "%SOLR_PORT%"=="" ( + set "SCRIPT_ERROR=Must specify the port when trying to restart Solr." + goto err + ) + set SCRIPT_CMD=stop + set IS_RESTART=1 +) + +@REM stop logic here +IF "%SCRIPT_CMD%"=="stop" ( + IF "%SOLR_PORT%"=="" ( + IF "%STOP_ALL%"=="1" ( + set found_it=0 + for /f "usebackq" %%i in (`dir /b "%SOLR_TIP%\bin" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + @REM j is the ip:port and k is the pid + IF NOT "%%k"=="0" ( + IF "%%j"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" ( + set found_it=1 + @echo Stopping Solr process %%k running on port !SOME_SOLR_PORT! + set /A STOP_PORT=!SOME_SOLR_PORT! - 1000 + "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop + del "%SOLR_TIP%"\bin\solr-!SOME_SOLR_PORT!.port + timeout /T 5 + REM Kill it if it is still running after the graceful shutdown + For /f "tokens=2,5" %%M in ('netstat -nao ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF "%%N"=="%%k" ( + IF "%%M"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" ( + @echo Forcefully killing process %%N + taskkill /f /PID %%N + ) + ) + ) + ) + ) + ) + ) + ) + if "!found_it!"=="0" echo No Solr nodes found to stop. + ) ELSE ( + set "SCRIPT_ERROR=Must specify the port when trying to stop Solr, or use -all to stop all running nodes on this host." + goto err + ) + ) ELSE ( + set found_it=0 + For /f "tokens=2,5" %%M in ('netstat -nao ^| find "TCP " ^| find ":0 " ^| find ":%SOLR_PORT% "') do ( + IF NOT "%%N"=="0" ( + IF "%%M"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" ( + set found_it=1 + @echo Stopping Solr process %%N running on port %SOLR_PORT% + set /A STOP_PORT=%SOLR_PORT% - 1000 + "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" "%SOLR_JETTY_CONFIG%" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop + del "%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port + timeout /T 5 + REM Kill it if it is still running after the graceful shutdown + For /f "tokens=2,5" %%j in ('netstat -nao ^| find "TCP " ^| find ":0 " ^| find ":%SOLR_PORT% "') do ( + IF "%%N"=="%%k" ( + IF "%%j"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" ( + @echo Forcefully killing process %%N + taskkill /f /PID %%N + ) + ) + ) + ) + ) + ) + if "!found_it!"=="0" echo No Solr found running on port %SOLR_PORT% + ) + + IF "!IS_RESTART!"=="0" goto done +) + +IF "!IS_RESTART!"=="1" set SCRIPT_CMD=start + +IF "%SOLR_PORT%"=="" set SOLR_PORT=8983 +IF "%STOP_PORT%"=="" set /A STOP_PORT=%SOLR_PORT% - 1000 + +IF "%SCRIPT_CMD%"=="start" ( + REM see if Solr is already running using netstat + For /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":%SOLR_PORT% "') do ( + IF NOT "%%k"=="0" ( + IF "%%j"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" ( + set "SCRIPT_ERROR=Process %%k is already listening on port %SOLR_PORT%. If this is Solr, please stop it first before starting (or use restart). If this is not Solr, then please choose a different port using -p PORT" + goto err + ) + ) + ) +) + +@REM determine if -server flag is supported by current JVM +"%JAVA%" -server -version > nul 2>&1 +IF ERRORLEVEL 1 ( + set IS_JDK=false + set "SERVEROPT=" + @echo WARNING: You are using a JRE without support for -server option. Please upgrade to latest JDK for best performance + @echo. +) ELSE ( + set IS_JDK=true + set "SERVEROPT=-server" +) +"%JAVA%" -d64 -version > nul 2>&1 +IF ERRORLEVEL 1 ( + set "IS_64BIT=false" + @echo WARNING: 32-bit Java detected. Not recommended for production. Point your JAVA_HOME to a 64-bit JDK + @echo. +) ELSE ( + set IS_64bit=true +) + +REM backup log files (use current timestamp for backup name) +For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) +For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b) +set now_ts=!mydate!_!mytime! +IF EXIST "!SOLR_LOGS_DIR!\solr.log" ( + echo Backing up !SOLR_LOGS_DIR!\solr.log + move /Y "!SOLR_LOGS_DIR!\solr.log" "!SOLR_LOGS_DIR!\solr_log_!now_ts!" +) + +IF EXIST "!SOLR_LOGS_DIR!\solr_gc.log" ( + echo Backing up !SOLR_LOGS_DIR!\solr_gc.log + move /Y "!SOLR_LOGS_DIR!\solr_gc.log" "!SOLR_LOGS_DIR!\solr_gc_log_!now_ts!" +) + +IF NOT "%ZK_HOST%"=="" set SOLR_MODE=solrcloud + +IF "%SOLR_MODE%"=="solrcloud" ( + IF "%ZK_CLIENT_TIMEOUT%"=="" set "ZK_CLIENT_TIMEOUT=15000" + + set "CLOUD_MODE_OPTS=-DzkClientTimeout=!ZK_CLIENT_TIMEOUT!" + + IF NOT "%ZK_HOST%"=="" ( + set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -DzkHost=%ZK_HOST%" + ) ELSE ( + IF "%verbose%"=="1" echo Configuring SolrCloud to launch an embedded Zookeeper using -DzkRun + set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -DzkRun" + ) + IF EXIST "%SOLR_HOME%\collection1\core.properties" set "CLOUD_MODE_OPTS=!CLOUD_MODE_OPTS! -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DnumShards=1" +) ELSE ( + set CLOUD_MODE_OPTS= + IF NOT EXIST "%SOLR_HOME%\solr.xml" ( + set "SCRIPT_ERROR=Solr home directory %SOLR_HOME% must contain solr.xml!" + goto err + ) +) + +REM These are useful for attaching remove profilers like VisualVM/JConsole +IF "%ENABLE_REMOTE_JMX_OPTS%"=="true" ( + IF "!RMI_PORT!"=="" set RMI_PORT=1%SOLR_PORT% + set REMOTE_JMX_OPTS=-Dcom.sun.management.jmxremote ^ +-Dcom.sun.management.jmxremote.local.only=false ^ +-Dcom.sun.management.jmxremote.ssl=false ^ +-Dcom.sun.management.jmxremote.authenticate=false ^ +-Dcom.sun.management.jmxremote.port=!RMI_PORT! ^ +-Dcom.sun.management.jmxremote.rmi.port=!RMI_PORT! + + IF NOT "%SOLR_HOST%"=="" set REMOTE_JMX_OPTS=%REMOTE_JMX_OPTS% -Djava.rmi.server.hostname=%SOLR_HOST% +) ELSE ( + set REMOTE_JMX_OPTS= +) + +IF NOT "%SOLR_HEAP%"=="" set SOLR_JAVA_MEM=-Xms%SOLR_HEAP% -Xmx%SOLR_HEAP% +IF "%SOLR_JAVA_MEM%"=="" set SOLR_JAVA_MEM=-Xms512m -Xmx512m +IF "%SOLR_TIMEZONE%"=="" set SOLR_TIMEZONE=UTC + +IF "!JAVA_MAJOR_VERSION!"=="7" ( + set "GC_TUNE=%GC_TUNE% -XX:CMSFullGCsBeforeCompaction=1 -XX:CMSTriggerPermRatio=80" + IF !JAVA_BUILD! GEQ 40 ( + IF !JAVA_BUILD! LEQ 51 ( + set "GC_TUNE=!GC_TUNE! -XX:-UseSuperWord" + @echo WARNING: Java version !JAVA_VERSION_INFO! has known bugs with Lucene and requires the -XX:-UseSuperWord flag. Please consider upgrading your JVM. + ) + ) +) + +IF "%verbose%"=="1" ( + @echo Starting Solr using the following settings: + CALL :safe_echo " JAVA = %JAVA%" + CALL :safe_echo " SOLR_SERVER_DIR = %SOLR_SERVER_DIR%" + CALL :safe_echo " SOLR_HOME = %SOLR_HOME%" + @echo SOLR_HOST = %SOLR_HOST% + @echo SOLR_PORT = %SOLR_PORT% + @echo STOP_PORT = %STOP_PORT% + @echo SOLR_JAVA_MEM = %SOLR_JAVA_MEM% + @echo GC_TUNE = !GC_TUNE! + @echo GC_LOG_OPTS = %GC_LOG_OPTS% + @echo SOLR_TIMEZONE = %SOLR_TIMEZONE% + + IF "%SOLR_MODE%"=="solrcloud" ( + @echo CLOUD_MODE_OPTS = %CLOUD_MODE_OPTS% + ) + + IF NOT "%SOLR_OPTS%"=="" ( + @echo SOLR_OPTS = %SOLR_OPTS% + ) + + IF NOT "%SOLR_ADDL_ARGS%"=="" ( + CALL :safe_echo " SOLR_ADDL_ARGS = %SOLR_ADDL_ARGS%" + ) + + IF "%ENABLE_REMOTE_JMX_OPTS%"=="true" ( + @echo RMI_PORT = !RMI_PORT! + @echo REMOTE_JMX_OPTS = %REMOTE_JMX_OPTS% + ) + + @echo. +) + +set START_OPTS=-Duser.timezone=%SOLR_TIMEZONE% +set START_OPTS=%START_OPTS% !GC_TUNE! %GC_LOG_OPTS% +IF NOT "!CLOUD_MODE_OPTS!"=="" set "START_OPTS=%START_OPTS% !CLOUD_MODE_OPTS!" +IF NOT "%REMOTE_JMX_OPTS%"=="" set "START_OPTS=%START_OPTS% %REMOTE_JMX_OPTS%" +IF NOT "%SOLR_ADDL_ARGS%"=="" set "START_OPTS=%START_OPTS% %SOLR_ADDL_ARGS%" +IF NOT "%SOLR_HOST_ARG%"=="" set "START_OPTS=%START_OPTS% %SOLR_HOST_ARG%" +IF NOT "%SOLR_OPTS%"=="" set "START_OPTS=%START_OPTS% %SOLR_OPTS%" +IF NOT "%SOLR_SSL_OPTS%"=="" ( + set "SSL_PORT_PROP=-Dsolr.jetty.https.port=%SOLR_PORT%" + set "START_OPTS=%START_OPTS% %SOLR_SSL_OPTS% !SSL_PORT_PROP!" +) + +IF NOT DEFINED LOG4J_CONFIG set "LOG4J_CONFIG=file:%SOLR_SERVER_DIR%\resources\log4j.properties" + +cd /d "%SOLR_SERVER_DIR%" + +IF NOT EXIST "!SOLR_LOGS_DIR!" ( + mkdir "!SOLR_LOGS_DIR!" +) + +IF NOT EXIST "%SOLR_SERVER_DIR%\tmp" ( + mkdir "%SOLR_SERVER_DIR%\tmp" +) + +IF "%JAVA_VENDOR%" == "IBM J9" ( + set "GCLOG_OPT=-Xverbosegclog" +) else ( + set "GCLOG_OPT=-Xloggc" +) + +IF "%FG%"=="1" ( + REM run solr in the foreground + title "Solr-%SOLR_PORT%" + echo %SOLR_PORT%>"%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port + "%JAVA%" %SERVEROPT% %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ + -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" +) ELSE ( + START /B "Solr-%SOLR_PORT%" /D "%SOLR_SERVER_DIR%" "%JAVA%" %SERVEROPT% %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ + -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" > "!SOLR_LOGS_DIR!\solr-%SOLR_PORT%-console.log" + echo %SOLR_PORT%>"%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port + + REM now wait to see Solr come online ... + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI status -maxWaitSecs 30 -solr !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:%SOLR_PORT%/solr +) + +goto done + +:run_example +REM Run the requested example + +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI run_example -script "%SDIR%\solr.cmd" -e %EXAMPLE% -d "%SOLR_SERVER_DIR%" -urlScheme !SOLR_URL_SCHEME! !PASS_TO_RUN_EXAMPLE! + +REM End of run_example +goto done + +:get_info +REM Find all Java processes, correlate with those listening on a port +REM and then try to contact via that port using the status tool +for /f "usebackq" %%i in (`dir /b "%SOLR_TIP%\bin" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "Delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF NOT "%%k"=="0" ( + if "%%j"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" ( + @echo. + set has_info=1 + echo Found Solr process %%k running on port !SOME_SOLR_PORT! + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI status -solr !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!SOME_SOLR_PORT!/solr + @echo. + ) + ) + ) + ) +) +if NOT "!has_info!"=="1" echo No running Solr nodes found. +set has_info= +goto done + +:parse_healthcheck_args +IF [%1]==[] goto run_healthcheck +IF "%1"=="-c" goto set_healthcheck_collection +IF "%1"=="-collection" goto set_healthcheck_collection +IF "%1"=="-z" goto set_healthcheck_zk +IF "%1"=="-zkhost" goto set_healthcheck_zk +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +goto run_healthcheck + +:set_healthcheck_collection +set HEALTHCHECK_COLLECTION=%~2 +SHIFT +SHIFT +goto parse_healthcheck_args + +:set_healthcheck_zk +set HEALTHCHECK_ZK_HOST=%~2 +SHIFT +SHIFT +goto parse_healthcheck_args + +:run_healthcheck +IF NOT DEFINED HEALTHCHECK_COLLECTION goto healthcheck_usage +IF NOT DEFINED HEALTHCHECK_ZK_HOST set "HEALTHCHECK_ZK_HOST=localhost:9983" +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI healthcheck -collection !HEALTHCHECK_COLLECTION! -zkHost !HEALTHCHECK_ZK_HOST! +goto done + +:get_version +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI version +goto done + +:parse_create_args +IF [%1]==[] goto run_create +IF "%1"=="-c" goto set_create_name +IF "%1"=="-core" goto set_create_name +IF "%1"=="-collection" goto set_create_name +IF "%1"=="-d" goto set_create_confdir +IF "%1"=="-confdir" goto set_create_confdir +IF "%1"=="-n" goto set_create_confname +IF "%1"=="-confname" goto set_create_confname +IF "%1"=="-s" goto set_create_shards +IF "%1"=="-shards" goto set_create_shards +IF "%1"=="-rf" goto set_create_rf +IF "%1"=="-replicationFactor" goto set_create_rf +IF "%1"=="-p" goto set_create_port +IF "%1"=="-port" goto set_create_port +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +goto run_create + +:set_create_name +set CREATE_NAME=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_confdir +set CREATE_CONFDIR=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_confname +set CREATE_CONFNAME=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_port +set CREATE_PORT=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_shards +set CREATE_NUM_SHARDS=%~2 +SHIFT +SHIFT +goto parse_create_args + +:set_create_rf +set CREATE_REPFACT=%~2 +SHIFT +SHIFT +goto parse_create_args + +:run_create +IF "!CREATE_NAME!"=="" ( + set "SCRIPT_ERROR=Name (-c) is a required parameter for %SCRIPT_CMD%" + goto invalid_cmd_line +) +IF "!CREATE_CONFDIR!"=="" set CREATE_CONFDIR=data_driven_schema_configs +IF "!CREATE_NUM_SHARDS!"=="" set CREATE_NUM_SHARDS=1 +IF "!CREATE_REPFACT!"=="" set CREATE_REPFACT=1 +IF "!CREATE_CONFNAME!"=="" set CREATE_CONFNAME=!CREATE_NAME! + +REM Find a port that Solr is running on +if "!CREATE_PORT!"=="" ( + for /f "usebackq" %%i in (`dir /b "%SOLR_TIP%\bin" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "Delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF NOT "%%k"=="0" set CREATE_PORT=!SOME_SOLR_PORT! + ) + ) + ) +) +if "!CREATE_PORT!"=="" ( + set "SCRIPT_ERROR=Could not find a running Solr instance on this host! Please use the -p option to specify the port." + goto err +) + +if "%SCRIPT_CMD%"=="create_core" ( + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI create_core -name !CREATE_NAME! -solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!CREATE_PORT!/solr ^ + -confdir !CREATE_CONFDIR! -configsetsDir "%SOLR_TIP%\server\solr\configsets" +) else ( + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI create -name !CREATE_NAME! -shards !CREATE_NUM_SHARDS! -replicationFactor !CREATE_REPFACT! ^ + -confname !CREATE_CONFNAME! -confdir !CREATE_CONFDIR! -configsetsDir "%SOLR_TIP%\server\solr\configsets" -solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!CREATE_PORT!/solr +) + +goto done + +:parse_delete_args +IF [%1]==[] goto run_delete +IF "%1"=="-c" goto set_delete_name +IF "%1"=="-core" goto set_delete_name +IF "%1"=="-collection" goto set_delete_name +IF "%1"=="-p" goto set_delete_port +IF "%1"=="-port" goto set_delete_port +IF "%1"=="-deleteConfig" goto set_delete_config +IF "%1"=="-help" goto usage +IF "%1"=="-usage" goto usage +IF "%1"=="/?" goto usage +goto run_delete + +:set_delete_name +set DELETE_NAME=%~2 +SHIFT +SHIFT +goto parse_delete_args + +:set_delete_port +set DELETE_PORT=%~2 +SHIFT +SHIFT +goto parse_delete_args + +:set_delete_config +set DELETE_CONFIG=%~2 +SHIFT +SHIFT +goto parse_delete_args + +:run_delete +IF "!DELETE_NAME!"=="" ( + set "SCRIPT_ERROR=Name (-c) is a required parameter for %SCRIPT_CMD%" + goto invalid_cmd_line +) + +REM Find a port that Solr is running on +if "!DELETE_PORT!"=="" ( + for /f "usebackq" %%i in (`dir /b "%SOLR_TIP%\bin" ^| findstr /i "^solr-.*\.port$"`) do ( + set SOME_SOLR_PORT= + For /F "Delims=" %%J In ('type "%SOLR_TIP%\bin\%%i"') do set SOME_SOLR_PORT=%%~J + if NOT "!SOME_SOLR_PORT!"=="" ( + for /f "tokens=2,5" %%j in ('netstat -aon ^| find "TCP " ^| find ":0 " ^| find ":!SOME_SOLR_PORT! "') do ( + IF NOT "%%k"=="0" set DELETE_PORT=!SOME_SOLR_PORT! + ) + ) + ) +) +if "!DELETE_PORT!"=="" ( + set "SCRIPT_ERROR=Could not find a running Solr instance on this host! Please use the -p option to specify the port." + goto err +) + +if "!DELETE_CONFIG!"=="" ( + set DELETE_CONFIG=true +) + +"%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ +-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ +org.apache.solr.util.SolrCLI delete -name !DELETE_NAME! -deleteConfig !DELETE_CONFIG! ^ +-solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!DELETE_PORT!/solr + +goto done + +REM Clumsy to do the state machine thing for -d and -n, but that's required for back-compat +:parse_zk_args +IF "%1"=="-upconfig" ( + goto set_zk_op +) ELSE IF "%1"=="upconfig" ( + goto set_zk_op +) ELSE IF "%1"=="-downconfig" ( + goto set_zk_op +) ELSE IF "%1"=="downconfig" ( + goto set_zk_op +) ELSE IF "%1"=="cp" ( + goto set_zk_op +) ELSE IF "%1"=="mv" ( + goto set_zk_op +) ELSE IF "%1"=="rm" ( + goto set_zk_op +) ELSE IF "%1"=="ls" ( + goto set_zk_op +) ELSE IF "%1"=="-n" ( + goto set_config_name +) ELSE IF "%1"=="-r" ( + goto set_zk_recurse +) ELSE IF "%1"=="-configname" ( + goto set_config_name +) ELSE IF "%1"=="-d" ( + goto set_configdir +) ELSE IF "%1"=="-confdir" ( + goto set_configdir +) ELSE IF "%1"=="-z" ( + goto set_config_zk +) ELSE IF "%1"=="/?" ( + goto zk_usage +) ELSE IF "%1"=="-h" ( + goto zk_usage +) ELSE IF "%1"=="-help" ( + goto zk_usage +) ELSE IF "!ZK_SRC!"=="" ( + if not "%~1"=="" ( + goto set_zk_src + ) + goto zk_usage +) ELSE IF "!ZK_DST!"=="" ( + IF "%ZK_OP%"=="cp" ( + goto set_zk_dst + ) + IF "%ZK_OP%"=="mv" ( + goto set_zk_dst + ) + set ZK_DST="_" +) ELSE IF NOT "%1"=="" ( + set ERROR_MSG="Unrecognized or misplaced zk argument %1%" + goto zk_short_usage +) +goto run_zk + +:set_zk_op +set ZK_OP=%~1 +SHIFT +goto parse_zk_args + +:set_config_name +set CONFIGSET_NAME=%~2 +SHIFT +SHIFT +goto parse_zk_args + +:set_configdir +set CONFIGSET_DIR=%~2 +SHIFT +SHIFT +goto parse_zk_args + +:set_config_zk +set ZK_HOST=%~2 +SHIFT +SHIFT +goto parse_zk_args + +:set_zk_src +set ZK_SRC=%~1 +SHIFT +goto parse_zk_args + +:set_zk_dst +set ZK_DST=%~1 +SHIFT +goto parse_zk_args + +:set_zk_recurse +set ZK_RECURSE="true" +SHIFT +goto parse_zk_args + +:run_zk +IF "!ZK_OP!"=="" ( + set "ERROR_MSG=Invalid command specified for zk sub-command" + goto zk_short_usage +) + +IF "!ZK_HOST!"=="" ( + set "ERROR_MSG=Must specify -z zkHost" + goto zk_short_usage +) + +IF "!ZK_OP!"=="-upconfig" ( + set ZK_OP="upconfig" +) +IF "!ZK_OP!"=="-downconfig" ( + set ZK_OP="downconfig" +) + +IF "!ZK_OP!"=="upconfig" ( + IF "!CONFIGSET_NAME!"=="" ( + set ERROR_MSG="-n option must be set for upconfig" + goto zk_short_usage + ) + IF "!CONFIGSET_DIR!"=="" ( + set ERROR_MSG="The -d option must be set for upconfig." + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -confname !CONFIGSET_NAME! -confdir !CONFIGSET_DIR! -zkHost !ZK_HOST! -configsetsDir "%SOLR_TIP%/server/solr/configsets" +) ELSE IF "!ZK_OP!"=="downconfig" ( + IF "!CONFIGSET_NAME!"=="" ( + set ERROR_MSG="-n option must be set for downconfig" + goto zk_short_usage + ) + IF "!CONFIGSET_DIR!"=="" ( + set ERROR_MSG="The -d option must be set for downconfig." + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -confname !CONFIGSET_NAME! -confdir !CONFIGSET_DIR! -zkHost !ZK_HOST! +) ELSE IF "!ZK_OP!"=="cp" ( + IF "%ZK_SRC%"=="" ( + set ERROR_MSG=" must be specified for 'cp' command" + goto zk_short_usage + ) + IF "%ZK_DST%"=="" ( + set ERROR_MSG= must be specified for 'cp' command" + goto zk_short_usage + ) + IF NOT "!ZK_SRC:~0,3!"=="zk:" ( + IF NOT "!%ZK_DST:~0,3!"=="zk:" ( + set ERROR_MSG="At least one of src or dst must be prefixed by 'zk:'" + goto zk_short_usage + ) + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -src !ZK_SRC! -dst !ZK_DST! -recurse !ZK_RECURSE! +) ELSE IF "!ZK_OP!"=="mv" ( + IF "%ZK_SRC%"=="" ( + set ERROR_MSG=" must be specified for 'mv' command" + goto zk_short_usage + ) + IF "%ZK_DST%"=="" ( + set ERROR_MSG=" must be specified for 'mv' command" + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -src !ZK_SRC! -dst !ZK_DST! +) ELSE IF "!ZK_OP!"=="rm" ( + IF "%ZK_SRC"=="" ( + set ERROR_MSG="Zookeeper path to remove must be specified when using the 'rm' command" + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -path !ZK_SRC! -recurse !ZK_RECURSE! +) ELSE IF "!ZK_OP!"=="ls" ( + IF "%ZK_SRC"=="" ( + set ERROR_MSG="Zookeeper path to remove must be specified when using the 'rm' command" + goto zk_short_usage + ) + "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ + -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^ + org.apache.solr.util.SolrCLI !ZK_OP! -zkHost !ZK_HOST! -path !ZK_SRC! -recurse !ZK_RECURSE! +) ELSE ( + set ERROR_MSG="Unknown zk option !ZK_OP!" + goto zk_short_usage +) +goto done + +:invalid_cmd_line +@echo. +IF "!SCRIPT_ERROR!"=="" ( + @echo Invalid command-line option: %1 +) ELSE ( + @echo ERROR: !SCRIPT_ERROR! +) +@echo. +IF "%FIRST_ARG%"=="start" ( + goto start_usage +) ELSE IF "%FIRST_ARG:~0,1%" == "-" ( + goto start_usage +) ELSE IF "%FIRST_ARG%"=="restart" ( + goto start_usage +) ELSE IF "%FIRST_ARG%"=="stop" ( + goto stop_usage +) ELSE IF "%FIRST_ARG%"=="healthcheck" ( + goto healthcheck_usage +) ELSE IF "%FIRST_ARG%"=="create" ( + goto create_usage +) ELSE IF "%FIRST_ARG%"=="create_core" ( + goto create_core_usage +) ELSE IF "%FIRST_ARG%"=="create_collection" ( + goto create_collection_usage +) ELSE IF "%FIRST_ARG%"=="zk" ( + goto zk_short_usage +) ELSE ( + goto script_usage +) + +:need_java_home +@echo Please set the JAVA_HOME environment variable to the path where you installed Java 1.8+ +goto done + +:need_java_vers +@echo Java 1.8 or later is required to run Solr. +goto done + +:err +@echo. +@echo ERROR: !SCRIPT_ERROR! +@echo. +exit /b 1 + +:done +ENDLOCAL +exit /b 0 + +REM Tests what Java we have and sets some global variables +:resolve_java_info + +CALL :resolve_java_vendor + +set JAVA_MAJOR_VERSION=0 +set JAVA_VERSION_INFO= +set JAVA_BUILD=0 + +"%JAVA%" -version 2>&1 | findstr /i "version" > javavers +set /p JAVAVEROUT=&1 | findstr /i "IBM J9" > javares +set /p JAVA_VENDOR_OUT=" +statements in the solrconfig.xml file to reference plugin jars outside of +this directory for loading "contrib" plugins via relative paths. + +If you make a copy of this example server and wish to use the +ExtractingRequestHandler (SolrCell), DataImportHandler (DIH), UIMA, the +clustering component, or any other modules in "contrib", you will need to +copy the required jars or update the paths to those jars in your +solrconfig.xml. + +* Logging * + +By default, Jetty & Solr will log to the console and logs/solr.log. This can +be convenient when first getting started, but eventually you will want to +log just to a file. To configure logging, edit the log4j.properties file in +"resources". + +It is also possible to setup log4j or other popular logging frameworks. + diff --git a/KeywordSearch/release/solr/server/build.xml b/KeywordSearch/release/solr/server/build.xml new file mode 100644 index 0000000000..8600e17dae --- /dev/null +++ b/KeywordSearch/release/solr/server/build.xml @@ -0,0 +1,53 @@ + + + + Solr Server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/contexts/solr-jetty-context.xml b/KeywordSearch/release/solr/server/contexts/solr-jetty-context.xml new file mode 100644 index 0000000000..6392cd11b7 --- /dev/null +++ b/KeywordSearch/release/solr/server/contexts/solr-jetty-context.xml @@ -0,0 +1,8 @@ + + + + + /solr-webapp/webapp + /etc/webdefault.xml + false + diff --git a/KeywordSearch/release/solr/server/etc/jetty-http.xml b/KeywordSearch/release/solr/server/etc/jetty-http.xml new file mode 100644 index 0000000000..90e523ad4a --- /dev/null +++ b/KeywordSearch/release/solr/server/etc/jetty-http.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/etc/jetty-https.xml b/KeywordSearch/release/solr/server/etc/jetty-https.xml new file mode 100644 index 0000000000..e2770b1eb3 --- /dev/null +++ b/KeywordSearch/release/solr/server/etc/jetty-https.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http/1.1 + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/etc/jetty-ssl.xml b/KeywordSearch/release/solr/server/etc/jetty-ssl.xml new file mode 100644 index 0000000000..7f0007ac1f --- /dev/null +++ b/KeywordSearch/release/solr/server/etc/jetty-ssl.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + SSLv3 + + + + + SSL_RSA_WITH_DES_CBC_SHA + SSL_DHE_RSA_WITH_DES_CBC_SHA + SSL_DHE_DSS_WITH_DES_CBC_SHA + SSL_RSA_EXPORT_WITH_RC4_40_MD5 + SSL_RSA_EXPORT_WITH_DES40_CBC_SHA + SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA + SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/etc/jetty.xml b/KeywordSearch/release/solr/server/etc/jetty.xml new file mode 100644 index 0000000000..c819f0409c --- /dev/null +++ b/KeywordSearch/release/solr/server/etc/jetty.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + https + + + + + + + + + + + + + + + + + true + false + requestedPath + + + + + ^/$ + /solr/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + false + + + + + + + + + org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern + .*/servlet-api-[^/]*\.jar$ + + + + + + /contexts + 0 + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/etc/test/create-solrtest.keystore.sh b/KeywordSearch/release/solr/server/etc/test/create-solrtest.keystore.sh new file mode 100644 index 0000000000..36c5f0d392 --- /dev/null +++ b/KeywordSearch/release/solr/server/etc/test/create-solrtest.keystore.sh @@ -0,0 +1,37 @@ +#!/bin/bash -ex + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +############ + +# This script shows how the solrtest.keystore file used for solr tests +# was generated. +# +# Running this script should only be necessary if the keystore file +# needs to be replaced, which shouldn't be required until sometime around +# the year 4751. +# +# NOTE: the "-ext" option used in the "keytool" command requires that you have +# the java7 version of keytool, but the generated key will work with any +# version of java + +echo "### remove old keystore" +rm -f solrtest.keystore + +echo "### create keystore and keys" +keytool -keystore solrtest.keystore -storepass "secret" -alias solrtest -keypass "secret" -genkey -keyalg RSA -dname "cn=localhost, ou=SolrTest, o=lucene.apache.org, c=US" -ext "san=ip:127.0.0.1" -validity 999999 + + diff --git a/KeywordSearch/release/solr/server/etc/test/solrtest.keystore b/KeywordSearch/release/solr/server/etc/test/solrtest.keystore new file mode 100644 index 0000000000..bcc6ec05d7 Binary files /dev/null and b/KeywordSearch/release/solr/server/etc/test/solrtest.keystore differ diff --git a/KeywordSearch/release/solr/server/etc/webdefault.xml b/KeywordSearch/release/solr/server/etc/webdefault.xml new file mode 100644 index 0000000000..b987eac26b --- /dev/null +++ b/KeywordSearch/release/solr/server/etc/webdefault.xml @@ -0,0 +1,527 @@ + + + + + + + + + + + + + + + + + + + + + + + Default web.xml file. + This file is applied to a Web application before its own WEB_INF/web.xml file + + + + + + + + org.eclipse.jetty.servlet.listener.ELContextCleaner + + + + + + + + org.eclipse.jetty.servlet.listener.IntrospectorCleaner + + + + + + + + + + + + + + + + + + + default + org.eclipse.jetty.servlet.DefaultServlet + + aliases + false + + + acceptRanges + true + + + dirAllowed + true + + + welcomeServlets + false + + + redirectWelcome + false + + + maxCacheSize + 256000000 + + + maxCachedFileSize + 200000000 + + + maxCachedFiles + 2048 + + + gzip + true + + + useFileMappedBuffer + true + + + + 0 + + + + default + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jsp + org.apache.jasper.servlet.JspServlet + + logVerbosityLevel + DEBUG + + + fork + false + + + xpoweredBy + false + + + 0 + + + + jsp + *.jsp + *.jspf + *.jspx + *.xsp + *.JSP + *.JSPF + *.JSPX + *.XSP + + + + + + + + + + + + + + + + + + + + + + + + + + + + 30 + + + + + + + + + + + + + index.html + index.htm + index.jsp + + + + + + ar + ISO-8859-6 + + + be + ISO-8859-5 + + + bg + ISO-8859-5 + + + ca + ISO-8859-1 + + + cs + ISO-8859-2 + + + da + ISO-8859-1 + + + de + ISO-8859-1 + + + el + ISO-8859-7 + + + en + ISO-8859-1 + + + es + ISO-8859-1 + + + et + ISO-8859-1 + + + fi + ISO-8859-1 + + + fr + ISO-8859-1 + + + hr + ISO-8859-2 + + + hu + ISO-8859-2 + + + is + ISO-8859-1 + + + it + ISO-8859-1 + + + iw + ISO-8859-8 + + + ja + Shift_JIS + + + ko + EUC-KR + + + lt + ISO-8859-2 + + + lv + ISO-8859-2 + + + mk + ISO-8859-5 + + + nl + ISO-8859-1 + + + no + ISO-8859-1 + + + pl + ISO-8859-2 + + + pt + ISO-8859-1 + + + ro + ISO-8859-2 + + + ru + ISO-8859-5 + + + sh + ISO-8859-5 + + + sk + ISO-8859-2 + + + sl + ISO-8859-2 + + + sq + ISO-8859-2 + + + sr + ISO-8859-5 + + + sv + ISO-8859-1 + + + tr + ISO-8859-9 + + + uk + ISO-8859-5 + + + zh + GB2312 + + + zh_TW + Big5 + + + + + + Disable TRACE + / + TRACE + + + + + + diff --git a/KeywordSearch/release/solr/server/ivy.xml b/KeywordSearch/release/solr/server/ivy.xml new file mode 100644 index 0000000000..3a48224a08 --- /dev/null +++ b/KeywordSearch/release/solr/server/ivy.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/lib/ext/jcl-over-slf4j-1.7.7.jar b/KeywordSearch/release/solr/server/lib/ext/jcl-over-slf4j-1.7.7.jar new file mode 100644 index 0000000000..ed8d4ddb07 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/ext/jcl-over-slf4j-1.7.7.jar differ diff --git a/KeywordSearch/release/solr/server/lib/ext/jul-to-slf4j-1.7.7.jar b/KeywordSearch/release/solr/server/lib/ext/jul-to-slf4j-1.7.7.jar new file mode 100644 index 0000000000..f8a8f65f3b Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/ext/jul-to-slf4j-1.7.7.jar differ diff --git a/KeywordSearch/release/solr/server/lib/ext/log4j-1.2.17.jar b/KeywordSearch/release/solr/server/lib/ext/log4j-1.2.17.jar new file mode 100644 index 0000000000..1d425cf7d7 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/ext/log4j-1.2.17.jar differ diff --git a/KeywordSearch/release/solr/server/lib/ext/slf4j-api-1.7.7.jar b/KeywordSearch/release/solr/server/lib/ext/slf4j-api-1.7.7.jar new file mode 100644 index 0000000000..bebabd9619 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/ext/slf4j-api-1.7.7.jar differ diff --git a/KeywordSearch/release/solr/server/lib/ext/slf4j-log4j12-1.7.7.jar b/KeywordSearch/release/solr/server/lib/ext/slf4j-log4j12-1.7.7.jar new file mode 100644 index 0000000000..950293b739 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/ext/slf4j-log4j12-1.7.7.jar differ diff --git a/KeywordSearch/release/solr/server/lib/javax.servlet-api-3.1.0.jar b/KeywordSearch/release/solr/server/lib/javax.servlet-api-3.1.0.jar new file mode 100644 index 0000000000..6b14c3d267 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/javax.servlet-api-3.1.0.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-continuation-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-continuation-9.3.8.v20160314.jar new file mode 100644 index 0000000000..b04c381a25 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-continuation-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-deploy-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-deploy-9.3.8.v20160314.jar new file mode 100644 index 0000000000..a498832474 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-deploy-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-http-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-http-9.3.8.v20160314.jar new file mode 100644 index 0000000000..e96f14bd87 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-http-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-io-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-io-9.3.8.v20160314.jar new file mode 100644 index 0000000000..5bee006b3d Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-io-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-jmx-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-jmx-9.3.8.v20160314.jar new file mode 100644 index 0000000000..1e047e052d Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-jmx-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-rewrite-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-rewrite-9.3.8.v20160314.jar new file mode 100644 index 0000000000..b101e3bc74 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-rewrite-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-security-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-security-9.3.8.v20160314.jar new file mode 100644 index 0000000000..ec302c7ae7 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-security-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-server-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-server-9.3.8.v20160314.jar new file mode 100644 index 0000000000..dde15ab889 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-server-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-servlet-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-servlet-9.3.8.v20160314.jar new file mode 100644 index 0000000000..7bdf1e5e64 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-servlet-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-servlets-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-servlets-9.3.8.v20160314.jar new file mode 100644 index 0000000000..5dfa861470 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-servlets-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-util-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-util-9.3.8.v20160314.jar new file mode 100644 index 0000000000..89b9197625 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-util-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-webapp-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-webapp-9.3.8.v20160314.jar new file mode 100644 index 0000000000..052518cc81 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-webapp-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/lib/jetty-xml-9.3.8.v20160314.jar b/KeywordSearch/release/solr/server/lib/jetty-xml-9.3.8.v20160314.jar new file mode 100644 index 0000000000..ffab0152a8 Binary files /dev/null and b/KeywordSearch/release/solr/server/lib/jetty-xml-9.3.8.v20160314.jar differ diff --git a/KeywordSearch/release/solr/server/logs/solr-23232-console.log b/KeywordSearch/release/solr/server/logs/solr-23232-console.log new file mode 100644 index 0000000000..29b103553b --- /dev/null +++ b/KeywordSearch/release/solr/server/logs/solr-23232-console.log @@ -0,0 +1,37 @@ +0 INFO (main) [ ] o.e.j.u.log Logging initialized @745ms +234 INFO (main) [ ] o.e.j.s.Server jetty-9.3.8.v20160314 +250 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:///C:/Temp/lucene-solr-releases-lucene-solr-6.2.1/lucene-solr-releases-lucene-solr-6.2.1/solr/server/contexts/] at interval 0 +2390 INFO (main) [ ] o.e.j.w.StandardDescriptorProcessor NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet +2390 WARN (main) [ ] o.e.j.s.SecurityHandler ServletContext@o.e.j.w.WebAppContext@4e1d422d{/solr,file:///C:/Temp/lucene-solr-releases-lucene-solr-6.2.1/lucene-solr-releases-lucene-solr-6.2.1/solr/server/solr-webapp/webapp/,STARTING}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} has uncovered http methods for path: / +2406 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init(): WebAppClassLoader=25548982@185d8b6 +2437 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx) +2437 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +2437 INFO (main) [ ] o.a.s.c.SolrResourceLoader new SolrResourceLoader for directory: 'c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr' +2437 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx) +2437 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +2437 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr\solr.xml +2577 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Config-defined core root directory: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +2609 INFO (main) [ ] o.a.s.c.CoreContainer New CoreContainer 2011791487 +2609 INFO (main) [ ] o.a.s.c.CoreContainer Loading cores into CoreContainer [instanceDir=c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr] +2609 WARN (main) [ ] o.a.s.c.CoreContainer Couldn't add files from c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr\lib to classpath: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr\lib +2624 INFO (main) [ ] o.a.s.h.c.HttpShardHandlerFactory created with socketTimeout : 600000,connTimeout : 60000,maxConnectionsPerHost : 20,maxConnections : 10000,corePoolSize : 0,maximumPoolSize : 2147483647,maxThreadIdleTime : 5,sizeOfQueue : -1,fairnessPolicy : false,useRetries : false,connectionsEvictorSleepDelay : 5000,maxConnectionIdleTime : 40000, +3359 INFO (main) [ ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true +3374 INFO (main) [ ] o.a.s.l.LogWatcher SLF4J impl is org.slf4j.impl.Log4jLoggerFactory +3374 INFO (main) [ ] o.a.s.l.LogWatcher Registering Log Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)] +3374 INFO (main) [ ] o.a.s.c.CoreContainer Security conf doesn't exist. Skipping setup for authorization module. +3374 INFO (main) [ ] o.a.s.c.CoreContainer No authentication plugin used. +3452 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Looking for core definitions underneath c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +3468 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Found 0 core definitions +3468 INFO (main) [ ] o.a.s.s.SolrDispatchFilter user.dir=c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server +3468 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init() done +3484 INFO (main) [ ] o.e.j.s.h.ContextHandler Started o.e.j.w.WebAppContext@4e1d422d{/solr,file:///C:/Temp/lucene-solr-releases-lucene-solr-6.2.1/lucene-solr-releases-lucene-solr-6.2.1/solr/server/solr-webapp/webapp/,AVAILABLE}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} +3515 INFO (main) [ ] o.e.j.s.ServerConnector Started ServerConnector@fa4c865{HTTP/1.1,[http/1.1]}{0.0.0.0:23232} +3515 INFO (main) [ ] o.e.j.s.Server Started @4257ms +3843 INFO (qtp1389647288-15) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=json} status=0 QTime=218 +30306 INFO (qtp1389647288-15) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/cores params={indexInfo=false&wt=json&_=1478634564156} status=0 QTime=1 +30342 INFO (qtp1389647288-19) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=json&_=1478634564156} status=0 QTime=33 +30354 INFO (qtp1389647288-22) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=json&_=1478634564156} status=0 QTime=47 +311125 INFO (ShutdownMonitor) [ ] o.e.j.s.ServerConnector Stopped ServerConnector@fa4c865{HTTP/1.1,[http/1.1]}{0.0.0.0:23232} +311125 INFO (ShutdownMonitor) [ ] o.a.s.c.CoreContainer Shutting down CoreContainer instance=2011791487 +311135 INFO (ShutdownMonitor) [ ] o.e.j.s.h.ContextHandler Stopped o.e.j.w.WebAppContext@4e1d422d{/solr,null,UNAVAILABLE}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} +311135 WARN (ShutdownMonitor) [ ] o.e.j.s.ServletContextHandler ServletContextHandler.setHandler should not be called directly. Use insertHandler or setSessionHandler etc. diff --git a/KeywordSearch/release/solr/server/logs/solr.log b/KeywordSearch/release/solr/server/logs/solr.log new file mode 100644 index 0000000000..63e0906e33 --- /dev/null +++ b/KeywordSearch/release/solr/server/logs/solr.log @@ -0,0 +1,37 @@ +2016-11-08 19:48:54.365 INFO (main) [ ] o.e.j.u.log Logging initialized @745ms +2016-11-08 19:48:54.599 INFO (main) [ ] o.e.j.s.Server jetty-9.3.8.v20160314 +2016-11-08 19:48:54.615 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:///C:/Temp/lucene-solr-releases-lucene-solr-6.2.1/lucene-solr-releases-lucene-solr-6.2.1/solr/server/contexts/] at interval 0 +2016-11-08 19:48:56.755 INFO (main) [ ] o.e.j.w.StandardDescriptorProcessor NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet +2016-11-08 19:48:56.755 WARN (main) [ ] o.e.j.s.SecurityHandler ServletContext@o.e.j.w.WebAppContext@4e1d422d{/solr,file:///C:/Temp/lucene-solr-releases-lucene-solr-6.2.1/lucene-solr-releases-lucene-solr-6.2.1/solr/server/solr-webapp/webapp/,STARTING}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} has uncovered http methods for path: / +2016-11-08 19:48:56.771 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init(): WebAppClassLoader=25548982@185d8b6 +2016-11-08 19:48:56.802 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx) +2016-11-08 19:48:56.802 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +2016-11-08 19:48:56.802 INFO (main) [ ] o.a.s.c.SolrResourceLoader new SolrResourceLoader for directory: 'c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr' +2016-11-08 19:48:56.802 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx) +2016-11-08 19:48:56.802 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +2016-11-08 19:48:56.802 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr\solr.xml +2016-11-08 19:48:56.942 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Config-defined core root directory: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +2016-11-08 19:48:56.974 INFO (main) [ ] o.a.s.c.CoreContainer New CoreContainer 2011791487 +2016-11-08 19:48:56.974 INFO (main) [ ] o.a.s.c.CoreContainer Loading cores into CoreContainer [instanceDir=c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr] +2016-11-08 19:48:56.974 WARN (main) [ ] o.a.s.c.CoreContainer Couldn't add files from c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr\lib to classpath: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr\lib +2016-11-08 19:48:56.989 INFO (main) [ ] o.a.s.h.c.HttpShardHandlerFactory created with socketTimeout : 600000,connTimeout : 60000,maxConnectionsPerHost : 20,maxConnections : 10000,corePoolSize : 0,maximumPoolSize : 2147483647,maxThreadIdleTime : 5,sizeOfQueue : -1,fairnessPolicy : false,useRetries : false,connectionsEvictorSleepDelay : 5000,maxConnectionIdleTime : 40000, +2016-11-08 19:48:57.724 INFO (main) [ ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true +2016-11-08 19:48:57.739 INFO (main) [ ] o.a.s.l.LogWatcher SLF4J impl is org.slf4j.impl.Log4jLoggerFactory +2016-11-08 19:48:57.739 INFO (main) [ ] o.a.s.l.LogWatcher Registering Log Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)] +2016-11-08 19:48:57.739 INFO (main) [ ] o.a.s.c.CoreContainer Security conf doesn't exist. Skipping setup for authorization module. +2016-11-08 19:48:57.739 INFO (main) [ ] o.a.s.c.CoreContainer No authentication plugin used. +2016-11-08 19:48:57.817 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Looking for core definitions underneath c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server\solr +2016-11-08 19:48:57.833 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Found 0 core definitions +2016-11-08 19:48:57.833 INFO (main) [ ] o.a.s.s.SolrDispatchFilter user.dir=c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server +2016-11-08 19:48:57.833 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init() done +2016-11-08 19:48:57.849 INFO (main) [ ] o.e.j.s.h.ContextHandler Started o.e.j.w.WebAppContext@4e1d422d{/solr,file:///C:/Temp/lucene-solr-releases-lucene-solr-6.2.1/lucene-solr-releases-lucene-solr-6.2.1/solr/server/solr-webapp/webapp/,AVAILABLE}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} +2016-11-08 19:48:57.880 INFO (main) [ ] o.e.j.s.ServerConnector Started ServerConnector@fa4c865{HTTP/1.1,[http/1.1]}{0.0.0.0:23232} +2016-11-08 19:48:57.880 INFO (main) [ ] o.e.j.s.Server Started @4257ms +2016-11-08 19:48:58.208 INFO (qtp1389647288-15) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=json} status=0 QTime=218 +2016-11-08 19:49:24.671 INFO (qtp1389647288-15) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/cores params={indexInfo=false&wt=json&_=1478634564156} status=0 QTime=1 +2016-11-08 19:49:24.707 INFO (qtp1389647288-19) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=json&_=1478634564156} status=0 QTime=33 +2016-11-08 19:49:24.719 INFO (qtp1389647288-22) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=json&_=1478634564156} status=0 QTime=47 +2016-11-08 19:54:05.490 INFO (ShutdownMonitor) [ ] o.e.j.s.ServerConnector Stopped ServerConnector@fa4c865{HTTP/1.1,[http/1.1]}{0.0.0.0:23232} +2016-11-08 19:54:05.490 INFO (ShutdownMonitor) [ ] o.a.s.c.CoreContainer Shutting down CoreContainer instance=2011791487 +2016-11-08 19:54:05.500 INFO (ShutdownMonitor) [ ] o.e.j.s.h.ContextHandler Stopped o.e.j.w.WebAppContext@4e1d422d{/solr,null,UNAVAILABLE}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} +2016-11-08 19:54:05.500 WARN (ShutdownMonitor) [ ] o.e.j.s.ServletContextHandler ServletContextHandler.setHandler should not be called directly. Use insertHandler or setSessionHandler etc. diff --git a/KeywordSearch/release/solr/server/logs/solr_gc.log b/KeywordSearch/release/solr/server/logs/solr_gc.log new file mode 100644 index 0000000000..372b397a7e --- /dev/null +++ b/KeywordSearch/release/solr/server/logs/solr_gc.log @@ -0,0 +1,155 @@ +Java HotSpot(TM) 64-Bit Server VM (25.112-b15) for windows-amd64 JRE (1.8.0_112-b15), built on Sep 22 2016 21:31:56 by "java_re" with MS VC++ 10.0 (VS2010) +Memory: 4k page, physical 8266648k(1865600k free), swap 16531436k(9142724k free) +CommandLine flags: -XX:CMSInitiatingOccupancyFraction=50 -XX:CMSMaxAbortablePrecleanTime=6000 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:ConcGCThreads=4 -XX:InitialHeapSize=536870912 -XX:MaxHeapSize=536870912 -XX:MaxTenuringThreshold=8 -XX:NewRatio=3 -XX:OldPLABSize=16 -XX:ParallelGCThreads=4 -XX:+ParallelRefProcEnabled -XX:PretenureSizeThreshold=67108864 -XX:+PrintGC -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90 -XX:ThreadStackSize=256 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:-UseLargePagesIndividualAllocation -XX:+UseParNewGC +2016-11-08T14:48:53.771-0500: 0.165: Total time for which application threads were stopped: 0.0000832 seconds, Stopping threads took: 0.0000128 seconds +2016-11-08T14:48:53.880-0500: 0.266: Total time for which application threads were stopped: 0.0000942 seconds, Stopping threads took: 0.0000128 seconds +2016-11-08T14:48:54.396-0500: 0.786: Total time for which application threads were stopped: 0.0001583 seconds, Stopping threads took: 0.0000198 seconds +2016-11-08T14:48:54.599-0500: 0.991: Total time for which application threads were stopped: 0.0001539 seconds, Stopping threads took: 0.0000169 seconds +2016-11-08T14:48:54.677-0500: 1.064: Total time for which application threads were stopped: 0.0001444 seconds, Stopping threads took: 0.0000147 seconds +2016-11-08T14:48:55.693-0500: 2.071: Total time for which application threads were stopped: 0.0000806 seconds, Stopping threads took: 0.0000238 seconds +2016-11-08T14:48:56.708-0500: 3.087: Total time for which application threads were stopped: 0.0001180 seconds, Stopping threads took: 0.0000224 seconds +2016-11-08T14:48:56.739-0500: 3.131: Total time for which application threads were stopped: 0.0001605 seconds, Stopping threads took: 0.0000139 seconds +2016-11-08T14:48:57.021-0500: 3.398: Total time for which application threads were stopped: 0.0002379 seconds, Stopping threads took: 0.0000172 seconds +2016-11-08T14:48:57.021-0500: 3.399: Total time for which application threads were stopped: 0.0001382 seconds, Stopping threads took: 0.0000121 seconds +2016-11-08T14:48:57.021-0500: 3.402: Total time for which application threads were stopped: 0.0002203 seconds, Stopping threads took: 0.0000165 seconds +2016-11-08T14:48:57.489-0500: 3.871: Total time for which application threads were stopped: 0.0002507 seconds, Stopping threads took: 0.0000213 seconds +{Heap before GC invocations=0 (full 0): + par new generation total 109248K, used 87424K [0x00000000e0000000, 0x00000000e8000000, 0x00000000e8000000) + eden space 87424K, 100% used [0x00000000e0000000, 0x00000000e5560000, 0x00000000e5560000) + from space 21824K, 0% used [0x00000000e5560000, 0x00000000e5560000, 0x00000000e6ab0000) + to space 21824K, 0% used [0x00000000e6ab0000, 0x00000000e6ab0000, 0x00000000e8000000) + concurrent mark-sweep generation total 393216K, used 0K [0x00000000e8000000, 0x0000000100000000, 0x0000000100000000) + Metaspace used 16169K, capacity 16436K, committed 16768K, reserved 1064960K + class space used 1942K, capacity 2070K, committed 2176K, reserved 1048576K +2016-11-08T14:48:57.692-0500: 4.077: [GC (Allocation Failure) 2016-11-08T14:48:57.692-0500: 4.078: [ParNew +Desired survivor size 20112992 bytes, new threshold 8 (max 8) +- age 1: 9938752 bytes, 9938752 total +: 87424K->9811K(109248K), 0.0112782 secs] 87424K->9811K(502464K), 0.0120769 secs] [Times: user=0.06 sys=0.00, real=0.02 secs] +Heap after GC invocations=1 (full 0): + par new generation total 109248K, used 9811K [0x00000000e0000000, 0x00000000e8000000, 0x00000000e8000000) + eden space 87424K, 0% used [0x00000000e0000000, 0x00000000e0000000, 0x00000000e5560000) + from space 21824K, 44% used [0x00000000e6ab0000, 0x00000000e7444ce8, 0x00000000e8000000) + to space 21824K, 0% used [0x00000000e5560000, 0x00000000e5560000, 0x00000000e6ab0000) + concurrent mark-sweep generation total 393216K, used 0K [0x00000000e8000000, 0x0000000100000000, 0x0000000100000000) + Metaspace used 16169K, capacity 16436K, committed 16768K, reserved 1064960K + class space used 1942K, capacity 2070K, committed 2176K, reserved 1048576K +} +2016-11-08T14:48:57.708-0500: 4.089: Total time for which application threads were stopped: 0.0127700 seconds, Stopping threads took: 0.0000198 seconds +2016-11-08T14:48:57.739-0500: 4.115: Total time for which application threads were stopped: 0.0001979 seconds, Stopping threads took: 0.0000227 seconds +2016-11-08T14:48:57.833-0500: 4.219: Total time for which application threads were stopped: 0.0002104 seconds, Stopping threads took: 0.0001169 seconds +2016-11-08T14:48:57.880-0500: 4.259: Total time for which application threads were stopped: 0.0000913 seconds, Stopping threads took: 0.0000176 seconds +2016-11-08T14:48:57.880-0500: 4.259: Total time for which application threads were stopped: 0.0000422 seconds, Stopping threads took: 0.0000132 seconds +2016-11-08T14:48:57.911-0500: 4.290: Total time for which application threads were stopped: 0.0000711 seconds, Stopping threads took: 0.0000176 seconds +2016-11-08T14:48:57.911-0500: 4.290: Total time for which application threads were stopped: 0.0000389 seconds, Stopping threads took: 0.0000095 seconds +2016-11-08T14:48:57.911-0500: 4.291: Total time for which application threads were stopped: 0.0000704 seconds, Stopping threads took: 0.0000187 seconds +2016-11-08T14:48:57.911-0500: 4.291: Total time for which application threads were stopped: 0.0000564 seconds, Stopping threads took: 0.0000114 seconds +2016-11-08T14:48:57.911-0500: 4.291: Total time for which application threads were stopped: 0.0000444 seconds, Stopping threads took: 0.0000103 seconds +2016-11-08T14:48:57.911-0500: 4.291: Total time for which application threads were stopped: 0.0000546 seconds, Stopping threads took: 0.0000106 seconds +2016-11-08T14:48:57.911-0500: 4.296: Total time for which application threads were stopped: 0.0000594 seconds, Stopping threads took: 0.0000158 seconds +2016-11-08T14:48:57.927-0500: 4.317: Total time for which application threads were stopped: 0.0002577 seconds, Stopping threads took: 0.0000194 seconds +2016-11-08T14:48:57.958-0500: 4.341: Total time for which application threads were stopped: 0.0000762 seconds, Stopping threads took: 0.0000165 seconds +2016-11-08T14:48:57.958-0500: 4.341: Total time for which application threads were stopped: 0.0000293 seconds, Stopping threads took: 0.0000073 seconds +2016-11-08T14:48:57.958-0500: 4.341: Total time for which application threads were stopped: 0.0000205 seconds, Stopping threads took: 0.0000048 seconds +2016-11-08T14:48:57.958-0500: 4.341: Total time for which application threads were stopped: 0.0000198 seconds, Stopping threads took: 0.0000048 seconds +2016-11-08T14:48:57.974-0500: 4.356: Total time for which application threads were stopped: 0.0000641 seconds, Stopping threads took: 0.0000154 seconds +2016-11-08T14:48:57.974-0500: 4.357: Total time for which application threads were stopped: 0.0000301 seconds, Stopping threads took: 0.0000062 seconds +2016-11-08T14:48:57.974-0500: 4.359: Total time for which application threads were stopped: 0.0002412 seconds, Stopping threads took: 0.0000117 seconds +2016-11-08T14:48:58.005-0500: 4.381: Total time for which application threads were stopped: 0.0000608 seconds, Stopping threads took: 0.0000154 seconds +2016-11-08T14:48:58.005-0500: 4.390: Total time for which application threads were stopped: 0.0000707 seconds, Stopping threads took: 0.0000191 seconds +2016-11-08T14:48:58.192-0500: 4.581: Total time for which application threads were stopped: 0.0000656 seconds, Stopping threads took: 0.0000161 seconds +2016-11-08T14:48:58.208-0500: 4.585: Total time for which application threads were stopped: 0.0000546 seconds, Stopping threads took: 0.0000198 seconds +2016-11-08T14:48:58.208-0500: 4.585: Total time for which application threads were stopped: 0.0000458 seconds, Stopping threads took: 0.0000132 seconds +2016-11-08T14:48:58.208-0500: 4.592: Total time for which application threads were stopped: 0.0000553 seconds, Stopping threads took: 0.0000172 seconds +2016-11-08T14:48:58.208-0500: 4.592: Total time for which application threads were stopped: 0.0000213 seconds, Stopping threads took: 0.0000051 seconds +2016-11-08T14:48:58.208-0500: 4.592: Total time for which application threads were stopped: 0.0000198 seconds, Stopping threads took: 0.0000048 seconds +2016-11-08T14:48:58.208-0500: 4.592: Total time for which application threads were stopped: 0.0000491 seconds, Stopping threads took: 0.0000121 seconds +2016-11-08T14:48:58.208-0500: 4.592: Total time for which application threads were stopped: 0.0000231 seconds, Stopping threads took: 0.0000066 seconds +2016-11-08T14:48:58.208-0500: 4.592: Total time for which application threads were stopped: 0.0000400 seconds, Stopping threads took: 0.0000110 seconds +2016-11-08T14:48:58.208-0500: 4.592: Total time for which application threads were stopped: 0.0000341 seconds, Stopping threads took: 0.0000092 seconds +2016-11-08T14:48:58.286-0500: 4.665: Total time for which application threads were stopped: 0.0001001 seconds, Stopping threads took: 0.0000242 seconds +2016-11-08T14:48:58.286-0500: 4.666: Total time for which application threads were stopped: 0.0000553 seconds, Stopping threads took: 0.0000154 seconds +2016-11-08T14:49:08.357-0500: 14.883: Total time for which application threads were stopped: 0.0001598 seconds, Stopping threads took: 0.0000484 seconds +2016-11-08T14:49:18.373-0500: 24.948: Total time for which application threads were stopped: 0.0001382 seconds, Stopping threads took: 0.0000407 seconds +2016-11-08T14:49:22.674-0500: 29.279: Total time for which application threads were stopped: 0.0000572 seconds, Stopping threads took: 0.0000147 seconds +2016-11-08T14:49:22.674-0500: 29.279: Total time for which application threads were stopped: 0.0000231 seconds, Stopping threads took: 0.0000055 seconds +2016-11-08T14:49:22.674-0500: 29.279: Total time for which application threads were stopped: 0.0000227 seconds, Stopping threads took: 0.0000051 seconds +2016-11-08T14:49:22.707-0500: 29.315: Total time for which application threads were stopped: 0.0000740 seconds, Stopping threads took: 0.0000275 seconds +2016-11-08T14:49:22.707-0500: 29.315: Total time for which application threads were stopped: 0.0000403 seconds, Stopping threads took: 0.0000154 seconds +2016-11-08T14:49:22.707-0500: 29.315: Total time for which application threads were stopped: 0.0000334 seconds, Stopping threads took: 0.0000128 seconds +2016-11-08T14:49:22.707-0500: 29.315: Total time for which application threads were stopped: 0.0000326 seconds, Stopping threads took: 0.0000114 seconds +2016-11-08T14:49:22.707-0500: 29.315: Total time for which application threads were stopped: 0.0000315 seconds, Stopping threads took: 0.0000114 seconds +2016-11-08T14:49:22.708-0500: 29.316: Total time for which application threads were stopped: 0.0000667 seconds, Stopping threads took: 0.0000213 seconds +2016-11-08T14:49:22.708-0500: 29.316: Total time for which application threads were stopped: 0.0000411 seconds, Stopping threads took: 0.0000117 seconds +2016-11-08T14:49:22.718-0500: 29.327: Total time for which application threads were stopped: 0.0001305 seconds, Stopping threads took: 0.0000176 seconds +2016-11-08T14:49:22.722-0500: 29.332: Total time for which application threads were stopped: 0.0000865 seconds, Stopping threads took: 0.0000161 seconds +2016-11-08T14:49:22.777-0500: 29.387: Total time for which application threads were stopped: 0.0001880 seconds, Stopping threads took: 0.0001320 seconds +2016-11-08T14:49:22.778-0500: 29.389: Total time for which application threads were stopped: 0.0001052 seconds, Stopping threads took: 0.0000172 seconds +2016-11-08T14:49:22.779-0500: 29.389: Total time for which application threads were stopped: 0.0000572 seconds, Stopping threads took: 0.0000132 seconds +2016-11-08T14:49:22.779-0500: 29.390: Total time for which application threads were stopped: 0.0000385 seconds, Stopping threads took: 0.0000132 seconds +2016-11-08T14:49:22.780-0500: 29.390: Total time for which application threads were stopped: 0.0001473 seconds, Stopping threads took: 0.0000161 seconds +2016-11-08T14:49:22.780-0500: 29.391: Total time for which application threads were stopped: 0.0000777 seconds, Stopping threads took: 0.0000187 seconds +2016-11-08T14:49:22.788-0500: 29.398: Total time for which application threads were stopped: 0.0002987 seconds, Stopping threads took: 0.0000374 seconds +2016-11-08T14:49:22.789-0500: 29.399: Total time for which application threads were stopped: 0.0000858 seconds, Stopping threads took: 0.0000128 seconds +2016-11-08T14:49:22.791-0500: 29.401: Total time for which application threads were stopped: 0.0001059 seconds, Stopping threads took: 0.0000231 seconds +2016-11-08T14:49:22.808-0500: 29.419: Total time for which application threads were stopped: 0.0000986 seconds, Stopping threads took: 0.0000275 seconds +2016-11-08T14:49:22.840-0500: 29.451: Total time for which application threads were stopped: 0.0000986 seconds, Stopping threads took: 0.0000224 seconds +2016-11-08T14:49:22.842-0500: 29.453: Total time for which application threads were stopped: 0.0000887 seconds, Stopping threads took: 0.0000187 seconds +2016-11-08T14:49:22.842-0500: 29.454: Total time for which application threads were stopped: 0.0000898 seconds, Stopping threads took: 0.0000198 seconds +2016-11-08T14:49:22.845-0500: 29.456: Total time for which application threads were stopped: 0.0002489 seconds, Stopping threads took: 0.0000194 seconds +2016-11-08T14:49:22.852-0500: 29.464: Total time for which application threads were stopped: 0.0001096 seconds, Stopping threads took: 0.0000249 seconds +2016-11-08T14:49:22.859-0500: 29.471: Total time for which application threads were stopped: 0.0000784 seconds, Stopping threads took: 0.0000213 seconds +2016-11-08T14:49:22.860-0500: 29.472: Total time for which application threads were stopped: 0.0000711 seconds, Stopping threads took: 0.0000191 seconds +2016-11-08T14:49:22.895-0500: 29.508: Total time for which application threads were stopped: 0.0000744 seconds, Stopping threads took: 0.0000187 seconds +2016-11-08T14:49:22.954-0500: 29.569: Total time for which application threads were stopped: 0.0001199 seconds, Stopping threads took: 0.0000238 seconds +2016-11-08T14:49:22.956-0500: 29.571: Total time for which application threads were stopped: 0.0002401 seconds, Stopping threads took: 0.0000623 seconds +2016-11-08T14:49:22.958-0500: 29.574: Total time for which application threads were stopped: 0.0001081 seconds, Stopping threads took: 0.0000257 seconds +2016-11-08T14:49:22.977-0500: 29.593: Total time for which application threads were stopped: 0.0000729 seconds, Stopping threads took: 0.0000187 seconds +2016-11-08T14:49:22.977-0500: 29.593: Total time for which application threads were stopped: 0.0000473 seconds, Stopping threads took: 0.0000117 seconds +2016-11-08T14:49:22.977-0500: 29.593: Total time for which application threads were stopped: 0.0000396 seconds, Stopping threads took: 0.0000084 seconds +2016-11-08T14:49:22.977-0500: 29.593: Total time for which application threads were stopped: 0.0000425 seconds, Stopping threads took: 0.0000084 seconds +2016-11-08T14:49:22.977-0500: 29.594: Total time for which application threads were stopped: 0.0000374 seconds, Stopping threads took: 0.0000084 seconds +2016-11-08T14:49:22.977-0500: 29.594: Total time for which application threads were stopped: 0.0000352 seconds, Stopping threads took: 0.0000073 seconds +2016-11-08T14:49:22.977-0500: 29.594: Total time for which application threads were stopped: 0.0000363 seconds, Stopping threads took: 0.0000081 seconds +2016-11-08T14:49:22.977-0500: 29.594: Total time for which application threads were stopped: 0.0000385 seconds, Stopping threads took: 0.0000084 seconds +2016-11-08T14:49:22.977-0500: 29.594: Total time for which application threads were stopped: 0.0000407 seconds, Stopping threads took: 0.0000128 seconds +2016-11-08T14:49:23.537-0500: 30.166: Total time for which application threads were stopped: 0.0000986 seconds, Stopping threads took: 0.0000238 seconds +2016-11-08T14:49:23.715-0500: 30.347: Total time for which application threads were stopped: 0.0001001 seconds, Stopping threads took: 0.0000319 seconds +2016-11-08T14:49:23.715-0500: 30.347: Total time for which application threads were stopped: 0.0000429 seconds, Stopping threads took: 0.0000081 seconds +2016-11-08T14:49:23.715-0500: 30.347: Total time for which application threads were stopped: 0.0001635 seconds, Stopping threads took: 0.0000070 seconds +2016-11-08T14:49:24.677-0500: 31.323: Total time for which application threads were stopped: 0.0003416 seconds, Stopping threads took: 0.0002262 seconds +2016-11-08T14:49:24.677-0500: 31.323: Total time for which application threads were stopped: 0.0000766 seconds, Stopping threads took: 0.0000249 seconds +2016-11-08T14:49:24.678-0500: 31.324: Total time for which application threads were stopped: 0.0000957 seconds, Stopping threads took: 0.0000216 seconds +2016-11-08T14:49:24.679-0500: 31.326: Total time for which application threads were stopped: 0.0002251 seconds, Stopping threads took: 0.0001342 seconds +2016-11-08T14:49:24.679-0500: 31.326: Total time for which application threads were stopped: 0.0000682 seconds, Stopping threads took: 0.0000099 seconds +2016-11-08T14:49:24.682-0500: 31.327: Total time for which application threads were stopped: 0.0000993 seconds, Stopping threads took: 0.0000198 seconds +2016-11-08T14:49:24.682-0500: 31.328: Total time for which application threads were stopped: 0.0002353 seconds, Stopping threads took: 0.0000117 seconds +2016-11-08T14:49:24.683-0500: 31.328: Total time for which application threads were stopped: 0.0000638 seconds, Stopping threads took: 0.0000147 seconds +2016-11-08T14:49:24.684-0500: 31.329: Total time for which application threads were stopped: 0.0000748 seconds, Stopping threads took: 0.0000187 seconds +2016-11-08T14:49:24.684-0500: 31.329: Total time for which application threads were stopped: 0.0000473 seconds, Stopping threads took: 0.0000103 seconds +2016-11-08T14:49:24.684-0500: 31.329: Total time for which application threads were stopped: 0.0000473 seconds, Stopping threads took: 0.0000095 seconds +2016-11-08T14:49:24.684-0500: 31.330: Total time for which application threads were stopped: 0.0000462 seconds, Stopping threads took: 0.0000099 seconds +2016-11-08T14:49:24.684-0500: 31.330: Total time for which application threads were stopped: 0.0000465 seconds, Stopping threads took: 0.0000095 seconds +2016-11-08T14:49:24.684-0500: 31.330: Total time for which application threads were stopped: 0.0000451 seconds, Stopping threads took: 0.0000092 seconds +2016-11-08T14:49:24.684-0500: 31.330: Total time for which application threads were stopped: 0.0000465 seconds, Stopping threads took: 0.0000103 seconds +2016-11-08T14:49:24.685-0500: 31.330: Total time for which application threads were stopped: 0.0000451 seconds, Stopping threads took: 0.0000092 seconds +2016-11-08T14:49:24.708-0500: 31.354: Total time for which application threads were stopped: 0.0012433 seconds, Stopping threads took: 0.0011846 seconds +2016-11-08T14:49:25.709-0500: 32.366: Total time for which application threads were stopped: 0.0001276 seconds, Stopping threads took: 0.0000553 seconds +2016-11-08T14:49:27.712-0500: 34.368: Total time for which application threads were stopped: 0.0001045 seconds, Stopping threads took: 0.0000491 seconds +2016-11-08T14:50:14.798-0500: 82.398: Total time for which application threads were stopped: 0.0001646 seconds, Stopping threads took: 0.0000484 seconds +2016-11-08T14:50:28.820-0500: 96.583: Total time for which application threads were stopped: 0.0001602 seconds, Stopping threads took: 0.0000495 seconds +2016-11-08T14:51:24.915-0500: 154.337: Total time for which application threads were stopped: 0.0001613 seconds, Stopping threads took: 0.0000473 seconds +2016-11-08T14:53:00.291-0500: 249.577: Total time for which application threads were stopped: 0.0001741 seconds, Stopping threads took: 0.0000487 seconds +2016-11-08T14:53:43.746-0500: 292.976: Total time for which application threads were stopped: 0.0002148 seconds, Stopping threads took: 0.0000704 seconds +2016-11-08T14:54:05.490-0500: 314.690: Total time for which application threads were stopped: 0.0001015 seconds, Stopping threads took: 0.0000246 seconds +2016-11-08T14:54:05.490-0500: 314.691: Total time for which application threads were stopped: 0.0000689 seconds, Stopping threads took: 0.0000202 seconds +2016-11-08T14:54:05.490-0500: 314.691: Total time for which application threads were stopped: 0.0000484 seconds, Stopping threads took: 0.0000194 seconds +2016-11-08T14:54:05.490-0500: 314.691: Total time for which application threads were stopped: 0.0000312 seconds, Stopping threads took: 0.0000117 seconds +2016-11-08T14:54:05.500-0500: 314.697: Total time for which application threads were stopped: 0.0000678 seconds, Stopping threads took: 0.0000150 seconds +Heap + par new generation total 109248K, used 47555K [0x00000000e0000000, 0x00000000e8000000, 0x00000000e8000000) + eden space 87424K, 43% used [0x00000000e0000000, 0x00000000e24dc308, 0x00000000e5560000) + from space 21824K, 44% used [0x00000000e6ab0000, 0x00000000e7444ce8, 0x00000000e8000000) + to space 21824K, 0% used [0x00000000e5560000, 0x00000000e5560000, 0x00000000e6ab0000) + concurrent mark-sweep generation total 393216K, used 0K [0x00000000e8000000, 0x0000000100000000, 0x0000000100000000) + Metaspace used 20200K, capacity 20526K, committed 20864K, reserved 1067008K + class space used 2424K, capacity 2567K, committed 2688K, reserved 1048576K diff --git a/KeywordSearch/release/solr/server/logs/solr_gc_log_2016-11-08_1448 b/KeywordSearch/release/solr/server/logs/solr_gc_log_2016-11-08_1448 new file mode 100644 index 0000000000..417d98aa8c --- /dev/null +++ b/KeywordSearch/release/solr/server/logs/solr_gc_log_2016-11-08_1448 @@ -0,0 +1,22 @@ +Java HotSpot(TM) 64-Bit Server VM (25.112-b15) for windows-amd64 JRE (1.8.0_112-b15), built on Sep 22 2016 21:31:56 by "java_re" with MS VC++ 10.0 (VS2010) +Memory: 4k page, physical 8266648k(1883896k free), swap 16531436k(9139864k free) +CommandLine flags: -XX:CMSInitiatingOccupancyFraction=50 -XX:CMSMaxAbortablePrecleanTime=6000 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:ConcGCThreads=4 -XX:InitialHeapSize=536870912 -XX:MaxHeapSize=536870912 -XX:MaxTenuringThreshold=8 -XX:NewRatio=3 -XX:OldPLABSize=16 -XX:ParallelGCThreads=4 -XX:+ParallelRefProcEnabled -XX:PretenureSizeThreshold=67108864 -XX:+PrintGC -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90 -XX:ThreadStackSize=256 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:-UseLargePagesIndividualAllocation -XX:+UseParNewGC +2016-11-08T14:38:34.975-0500: 0.271: Total time for which application threads were stopped: 0.0000964 seconds, Stopping threads took: 0.0000128 seconds +2016-11-08T14:38:35.069-0500: 0.367: Total time for which application threads were stopped: 0.0000909 seconds, Stopping threads took: 0.0000147 seconds +2016-11-08T14:38:35.522-0500: 0.809: Total time for which application threads were stopped: 0.0001202 seconds, Stopping threads took: 0.0000128 seconds +2016-11-08T14:38:35.741-0500: 1.038: Total time for which application threads were stopped: 0.0001276 seconds, Stopping threads took: 0.0000202 seconds +2016-11-08T14:38:35.819-0500: 1.105: Total time for which application threads were stopped: 0.0001404 seconds, Stopping threads took: 0.0000154 seconds +2016-11-08T14:38:35.835-0500: 1.120: Total time for which application threads were stopped: 0.0001279 seconds, Stopping threads took: 0.0000139 seconds +2016-11-08T14:38:36.850-0500: 2.132: Total time for which application threads were stopped: 0.0000608 seconds, Stopping threads took: 0.0000158 seconds +2016-11-08T14:38:38.866-0500: 4.144: Total time for which application threads were stopped: 0.0003354 seconds, Stopping threads took: 0.0000403 seconds +2016-11-08T14:41:36.557-0500: 181.562: Total time for which application threads were stopped: 0.0001089 seconds, Stopping threads took: 0.0000447 seconds +2016-11-08T14:43:07.026-0500: 273.564: Total time for which application threads were stopped: 0.0000777 seconds, Stopping threads took: 0.0000216 seconds +2016-11-08T14:48:32.802-0500: 605.055: Total time for which application threads were stopped: 0.0000630 seconds, Stopping threads took: 0.0000202 seconds +Heap + par new generation total 109248K, used 43748K [0x00000000e0000000, 0x00000000e8000000, 0x00000000e8000000) + eden space 87424K, 50% used [0x00000000e0000000, 0x00000000e2ab9088, 0x00000000e5560000) + from space 21824K, 0% used [0x00000000e5560000, 0x00000000e5560000, 0x00000000e6ab0000) + to space 21824K, 0% used [0x00000000e6ab0000, 0x00000000e6ab0000, 0x00000000e8000000) + concurrent mark-sweep generation total 393216K, used 0K [0x00000000e8000000, 0x0000000100000000, 0x0000000100000000) + Metaspace used 11524K, capacity 11728K, committed 12032K, reserved 1060864K + class space used 1381K, capacity 1442K, committed 1536K, reserved 1048576K diff --git a/KeywordSearch/release/solr/server/logs/solr_log_2016-11-08_1448 b/KeywordSearch/release/solr/server/logs/solr_log_2016-11-08_1448 new file mode 100644 index 0000000000..1b5b41aed7 --- /dev/null +++ b/KeywordSearch/release/solr/server/logs/solr_log_2016-11-08_1448 @@ -0,0 +1,49 @@ +2016-11-08 19:38:35.491 INFO (main) [ ] o.e.j.u.log Logging initialized @777ms +2016-11-08 19:38:35.741 INFO (main) [ ] o.e.j.s.Server jetty-9.3.8.v20160314 +2016-11-08 19:38:35.756 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:///C:/Temp/lucene-solr-releases-lucene-solr-6.2.1/lucene-solr-releases-lucene-solr-6.2.1/solr/server/contexts/] at interval 0 +2016-11-08 19:38:35.819 WARN (main) [ ] o.e.j.w.WebInfConfiguration Web application not found c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp +2016-11-08 19:38:35.835 WARN (main) [ ] o.e.j.w.WebAppContext Failed startup of context o.e.j.w.WebAppContext@4e1d422d{/solr,null,null}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} +java.io.FileNotFoundException: c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp + at org.eclipse.jetty.webapp.WebInfConfiguration.unpack(WebInfConfiguration.java:497) + at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:72) + at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:480) + at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:516) + at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) + at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41) + at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188) + at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499) + at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147) + at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180) + at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:458) + at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64) + at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610) + at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529) + at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392) + at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313) + at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) + at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150) + at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) + at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561) + at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236) + at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) + at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) + at org.eclipse.jetty.server.Server.start(Server.java:405) + at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) + at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) + at org.eclipse.jetty.server.Server.doStart(Server.java:372) + at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) + at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1510) + at java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1435) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) + at java.lang.reflect.Method.invoke(Unknown Source) + at org.eclipse.jetty.start.Main.invokeMain(Main.java:214) + at org.eclipse.jetty.start.Main.start(Main.java:457) + at org.eclipse.jetty.start.Main.main(Main.java:75) +2016-11-08 19:38:35.928 INFO (main) [ ] o.e.j.s.ServerConnector Started ServerConnector@33c7e1bb{HTTP/1.1,[http/1.1]}{0.0.0.0:23232} +2016-11-08 19:38:35.928 INFO (main) [ ] o.e.j.s.Server Started @1225ms +2016-11-08 19:48:32.793 INFO (ShutdownMonitor) [ ] o.e.j.s.ServerConnector Stopped ServerConnector@33c7e1bb{HTTP/1.1,[http/1.1]}{0.0.0.0:23232} +2016-11-08 19:48:32.796 INFO (ShutdownMonitor) [ ] o.e.j.s.h.ContextHandler Stopped o.e.j.w.WebAppContext@4e1d422d{/solr,null,UNAVAILABLE}{c:\Temp\lucene-solr-releases-lucene-solr-6.2.1\lucene-solr-releases-lucene-solr-6.2.1\solr\server/solr-webapp/webapp} +2016-11-08 19:48:32.798 WARN (ShutdownMonitor) [ ] o.e.j.s.ServletContextHandler ServletContextHandler.setHandler should not be called directly. Use insertHandler or setSessionHandler etc. diff --git a/KeywordSearch/release/solr/server/modules/http.mod b/KeywordSearch/release/solr/server/modules/http.mod new file mode 100644 index 0000000000..d4ceec5120 --- /dev/null +++ b/KeywordSearch/release/solr/server/modules/http.mod @@ -0,0 +1,9 @@ +# +# Jetty HTTP Connector +# + +[depend] +server + +[xml] +etc/jetty-http.xml \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/modules/https.mod b/KeywordSearch/release/solr/server/modules/https.mod new file mode 100644 index 0000000000..8affbcf60f --- /dev/null +++ b/KeywordSearch/release/solr/server/modules/https.mod @@ -0,0 +1,9 @@ +# +# Jetty HTTPS Connector +# + +[depend] +ssl + +[xml] +etc/jetty-https.xml \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/modules/server.mod b/KeywordSearch/release/solr/server/modules/server.mod new file mode 100644 index 0000000000..0d60a9e3f4 --- /dev/null +++ b/KeywordSearch/release/solr/server/modules/server.mod @@ -0,0 +1,11 @@ +# +# Base Server Module +# + +[lib] +lib/*.jar +lib/ext/*.jar +resources/ + +[xml] +etc/jetty.xml \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/modules/ssl.mod b/KeywordSearch/release/solr/server/modules/ssl.mod new file mode 100644 index 0000000000..091e3dea0d --- /dev/null +++ b/KeywordSearch/release/solr/server/modules/ssl.mod @@ -0,0 +1,9 @@ +# +# SSL Keystore module +# + +[depend] +server + +[xml] +etc/jetty-ssl.xml \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/resources/jetty-logging.properties b/KeywordSearch/release/solr/server/resources/jetty-logging.properties new file mode 100644 index 0000000000..55b0c37d34 --- /dev/null +++ b/KeywordSearch/release/solr/server/resources/jetty-logging.properties @@ -0,0 +1 @@ +org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/resources/log4j.properties b/KeywordSearch/release/solr/server/resources/log4j.properties new file mode 100644 index 0000000000..d5ebcd1f83 --- /dev/null +++ b/KeywordSearch/release/solr/server/resources/log4j.properties @@ -0,0 +1,24 @@ +# Logging level +solr.log=logs +log4j.rootLogger=INFO, file, CONSOLE + +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender + +log4j.appender.CONSOLE.layout=org.apache.log4j.EnhancedPatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%-4r %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n + +#- size rotation with log cleanup. +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.MaxFileSize=4MB +log4j.appender.file.MaxBackupIndex=9 + +#- File to log to and log format +log4j.appender.file.File=${solr.log}/solr.log +log4j.appender.file.layout=org.apache.log4j.EnhancedPatternLayout +log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n + +log4j.logger.org.apache.zookeeper=WARN +log4j.logger.org.apache.hadoop=WARN + +# set to INFO to enable infostream log messages +log4j.logger.org.apache.solr.update.LoggingInfoStream=OFF diff --git a/KeywordSearch/release/solr/server/scripts/cloud-scripts/log4j.properties b/KeywordSearch/release/solr/server/scripts/cloud-scripts/log4j.properties new file mode 100644 index 0000000000..5f2ae18574 --- /dev/null +++ b/KeywordSearch/release/solr/server/scripts/cloud-scripts/log4j.properties @@ -0,0 +1,12 @@ +# Logging level +log4j.rootLogger=INFO, stderr + +# log to stderr +log4j.appender.stderr = org.apache.log4j.ConsoleAppender +log4j.appender.stderr.Target = System.err +log4j.appender.stderr.layout = org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; %C; %m%n + +# quiet down the ZK logging for cli tools +log4j.logger.org.apache.zookeeper=WARN +log4j.logger.org.apache.solr.common.cloud=WARN diff --git a/KeywordSearch/release/solr/server/scripts/cloud-scripts/zkcli.bat b/KeywordSearch/release/solr/server/scripts/cloud-scripts/zkcli.bat new file mode 100644 index 0000000000..0e4359ceac --- /dev/null +++ b/KeywordSearch/release/solr/server/scripts/cloud-scripts/zkcli.bat @@ -0,0 +1,25 @@ +@echo off +REM You can override pass the following parameters to this script: +REM + +set JVM=java + +REM Find location of this script + +set SDIR=%~dp0 +if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1% + +if defined LOG4J_PROPS ( + set "LOG4J_CONFIG=file:%LOG4J_PROPS%" +) else ( + set "LOG4J_CONFIG=file:%SDIR%\log4j.properties" +) + +REM Settings for ZK ACL +REM set SOLR_ZK_CREDS_AND_ACLS=-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider ^ +REM -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider ^ +REM -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD ^ +REM -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD + +"%JVM%" %SOLR_ZK_CREDS_AND_ACLS% -Dlog4j.configuration="%LOG4J_CONFIG%" ^ +-classpath "%SDIR%\..\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\..\lib\ext\*" org.apache.solr.cloud.ZkCLI %* diff --git a/KeywordSearch/release/solr/server/scripts/cloud-scripts/zkcli.sh b/KeywordSearch/release/solr/server/scripts/cloud-scripts/zkcli.sh new file mode 100644 index 0000000000..e37b6dacfc --- /dev/null +++ b/KeywordSearch/release/solr/server/scripts/cloud-scripts/zkcli.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# You can override pass the following parameters to this script: +# + +JVM="java" + +# Find location of this script + +sdir="`dirname \"$0\"`" + +if [ -n "$LOG4J_PROPS" ]; then + log4j_config="file:$LOG4J_PROPS" +else + log4j_config="file:$sdir/log4j.properties" +fi + +# Settings for ZK ACL +#SOLR_ZK_CREDS_AND_ACLS="-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider \ +# -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider \ +# -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD \ +# -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD" + +PATH=$JAVA_HOME/bin:$PATH $JVM $SOLR_ZK_CREDS_AND_ACLS -Dlog4j.configuration=$log4j_config \ +-classpath "$sdir/../../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../../lib/ext/*" org.apache.solr.cloud.ZkCLI ${1+"$@"} + diff --git a/KeywordSearch/release/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh b/KeywordSearch/release/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh new file mode 100644 index 0000000000..0d22f63f80 --- /dev/null +++ b/KeywordSearch/release/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +###################################################################### +# +# Running this script will set two environment variables: +# HADOOP_CLASSPATH +# HADOOP_LIBJAR: pass this to the -libjar MapReduceIndexBuilder option +# +###################################################################### + +# return absolute path +function absPath { + echo $(cd $(dirname "$1"); pwd)/$(basename "$1") +} + + +# Find location of this script + +sdir="`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd`" + +solr_distrib="$sdir/../../.." + +echo `absPath $solr_distrib` + +# Setup env variables for MapReduceIndexerTool + +# Setup HADOOP_CLASSPATH + +dir1=`absPath "$solr_distrib/dist"` +dir2=`absPath "$solr_distrib/dist/solrj-lib"` +dir3=`absPath "$solr_distrib/contrib/map-reduce/lib"` +dir4=`absPath "$solr_distrib/contrib/morphlines-core/lib"` +dir5=`absPath "$solr_distrib/contrib/morphlines-cell/lib"` +dir6=`absPath "$solr_distrib/contrib/extraction/lib"` +dir7=`absPath "$solr_distrib/server/solr-webapp/webapp/WEB-INF/lib"` + +# Setup -libjar + +lib1=`ls -m $dir1/*.jar | tr -d ' \n'` +lib2=`ls -m $dir2/*.jar | tr -d ' \n' | sed 's/\,[^\,]*\(log4j\|slf4j\)[^\,]*//g'` +lib3=`ls -m $dir3/*.jar | tr -d ' \n'` +lib4=`ls -m $dir4/*.jar | tr -d ' \n'` +lib5=`ls -m $dir5/*.jar | tr -d ' \n'` +lib6=`ls -m $dir6/*.jar | tr -d ' \n'` +lib7=`ls -m $dir7/*.jar | tr -d ' \n'` + +export HADOOP_CLASSPATH="$dir1/*:$dir2/*:$dir3/*:$dir4/*:$dir5/*:$dir6/*:$dir7/*" +export HADOOP_LIBJAR="$lib1,$lib2,$lib3,$lib4,$lib5,$lib6,$lib7" + +#echo $HADOOP_CLASSPATH +#echo $HADOOP_LIBJAR + diff --git a/KeywordSearch/release/solr/server/solr-webapp/.gitignore b/KeywordSearch/release/solr/server/solr-webapp/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/antlr4-runtime-4.5.1-1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/antlr4-runtime-4.5.1-1.jar new file mode 100644 index 0000000000..387129d648 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/antlr4-runtime-4.5.1-1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/asm-5.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/asm-5.1.jar new file mode 100644 index 0000000000..18433c1a22 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/asm-5.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/asm-commons-5.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/asm-commons-5.1.jar new file mode 100644 index 0000000000..2c8d5b4785 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/asm-commons-5.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/caffeine-1.0.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/caffeine-1.0.1.jar new file mode 100644 index 0000000000..265389e305 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/caffeine-1.0.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-cli-1.2.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-cli-1.2.jar new file mode 100644 index 0000000000..ce4b9fffe4 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-cli-1.2.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-codec-1.10.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-codec-1.10.jar new file mode 100644 index 0000000000..1d7417c403 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-codec-1.10.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-collections-3.2.2.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-collections-3.2.2.jar new file mode 100644 index 0000000000..fa5df82a63 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-collections-3.2.2.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-configuration-1.6.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-configuration-1.6.jar new file mode 100644 index 0000000000..2d4689a1b8 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-configuration-1.6.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-exec-1.3.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-exec-1.3.jar new file mode 100644 index 0000000000..9a64351981 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-exec-1.3.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-fileupload-1.3.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-fileupload-1.3.1.jar new file mode 100644 index 0000000000..af0cda226f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-fileupload-1.3.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-io-2.5.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-io-2.5.jar new file mode 100644 index 0000000000..107b061f5f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-io-2.5.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-lang-2.6.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-lang-2.6.jar new file mode 100644 index 0000000000..98467d3a65 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-lang-2.6.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-client-2.8.0.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-client-2.8.0.jar new file mode 100644 index 0000000000..4ccc265cc4 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-client-2.8.0.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-framework-2.8.0.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-framework-2.8.0.jar new file mode 100644 index 0000000000..5e488892d1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-framework-2.8.0.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-recipes-2.8.0.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-recipes-2.8.0.jar new file mode 100644 index 0000000000..34eb9c9677 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/curator-recipes-2.8.0.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/dom4j-1.6.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000000..c8c4dbb92d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/guava-14.0.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/guava-14.0.1.jar new file mode 100644 index 0000000000..3a3d9258e3 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/guava-14.0.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-annotations-2.7.2.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-annotations-2.7.2.jar new file mode 100644 index 0000000000..f8ceca4666 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-annotations-2.7.2.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.7.2.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.7.2.jar new file mode 100644 index 0000000000..03bf35c028 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.7.2.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.7.2.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.7.2.jar new file mode 100644 index 0000000000..d6957180b6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.7.2.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.7.2.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.7.2.jar new file mode 100644 index 0000000000..e8d1b98c70 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.7.2.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hppc-0.7.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hppc-0.7.1.jar new file mode 100644 index 0000000000..ed318de214 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/hppc-0.7.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/htrace-core-3.2.0-incubating.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/htrace-core-3.2.0-incubating.jar new file mode 100644 index 0000000000..dfabed0646 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/htrace-core-3.2.0-incubating.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.4.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.4.1.jar new file mode 100644 index 0000000000..b80d37967e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.4.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpcore-4.4.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpcore-4.4.1.jar new file mode 100644 index 0000000000..99715b6a9f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpcore-4.4.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpmime-4.4.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpmime-4.4.1.jar new file mode 100644 index 0000000000..e748cbde7d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/httpmime-4.4.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-annotations-2.5.4.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-annotations-2.5.4.jar new file mode 100644 index 0000000000..3ac1d0ada9 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-annotations-2.5.4.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-2.5.4.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-2.5.4.jar new file mode 100644 index 0000000000..addf939117 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-2.5.4.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-databind-2.5.4.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-databind-2.5.4.jar new file mode 100644 index 0000000000..0bc240c909 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-databind-2.5.4.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-dataformat-smile-2.5.4.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-dataformat-smile-2.5.4.jar new file mode 100644 index 0000000000..87eb5c7e34 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-dataformat-smile-2.5.4.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/joda-time-2.2.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/joda-time-2.2.jar new file mode 100644 index 0000000000..69fa92409b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/joda-time-2.2.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-common-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-common-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..aa7063b7a5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-common-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-kuromoji-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-kuromoji-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..3a07acfc29 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-kuromoji-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-phonetic-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-phonetic-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..54c5c2726e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-analyzers-phonetic-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..d9298f7346 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-classification-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-classification-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..bf750fc495 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-classification-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-codecs-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-codecs-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..5070185059 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-codecs-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..bfdd1c8ed7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-expressions-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-expressions-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..eccc343468 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-expressions-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-grouping-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-grouping-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..876c37056e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-grouping-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-highlighter-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-highlighter-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..70891dbc7d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-highlighter-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-join-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-join-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..e5cc40cc05 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-join-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-memory-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-memory-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..3bc9b44405 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-memory-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..8950aa5838 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queries-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queries-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..bf88102574 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queries-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queryparser-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queryparser-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..d051cfcde5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queryparser-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-sandbox-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-sandbox-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..5f8f09018e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-sandbox-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-spatial-extras-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-spatial-extras-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..b7a5019c29 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-spatial-extras-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-suggest-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-suggest-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..ced7844022 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-suggest-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/noggit-0.6.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/noggit-0.6.jar new file mode 100644 index 0000000000..c23e06fe49 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/noggit-0.6.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.3.0.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.3.0.jar new file mode 100644 index 0000000000..64549e4980 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.3.0.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar new file mode 100644 index 0000000000..58a884ab9c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/presto-parser-0.122.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/presto-parser-0.122.jar new file mode 100644 index 0000000000..009f395aa0 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/presto-parser-0.122.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/protobuf-java-2.5.0.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/protobuf-java-2.5.0.jar new file mode 100644 index 0000000000..4c4e686a49 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/protobuf-java-2.5.0.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/slice-0.10.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/slice-0.10.jar new file mode 100644 index 0000000000..8fa3d7dd45 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/slice-0.10.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-core-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-core-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..db32f2c226 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-core-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-6.2.1-SNAPSHOT.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-6.2.1-SNAPSHOT.jar new file mode 100644 index 0000000000..00d27b97ec Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-6.2.1-SNAPSHOT.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/spatial4j-0.6.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/spatial4j-0.6.jar new file mode 100644 index 0000000000..1afa5074b0 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/spatial4j-0.6.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/stax2-api-3.1.4.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/stax2-api-3.1.4.jar new file mode 100644 index 0000000000..dded036928 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/stax2-api-3.1.4.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/t-digest-3.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/t-digest-3.1.jar new file mode 100644 index 0000000000..a638007a87 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/t-digest-3.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/woodstox-core-asl-4.4.1.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/woodstox-core-asl-4.4.1.jar new file mode 100644 index 0000000000..d8b4e8cf87 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/woodstox-core-asl-4.4.1.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/zookeeper-3.4.6.jar b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/zookeeper-3.4.6.jar new file mode 100644 index 0000000000..7c340be9f5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/lib/zookeeper-3.4.6.jar differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/web.xml b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..24a27ae451 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/web.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + SolrRequestFilter + org.apache.solr.servlet.SolrDispatchFilter + + + excludePatterns + /css/.+,/js/.+,/img/.+,/tpl/.+ + + + + + + SolrRequestFilter + /* + + + + LoadAdminUI + org.apache.solr.servlet.LoadAdminUiServlet + + + + + + RedirectOldAdminUI + org.apache.solr.servlet.RedirectServlet + + destination + ${context}/#/ + + + + + RedirectOldZookeeper + org.apache.solr.servlet.RedirectServlet + + destination + ${context}/admin/zookeeper + + + + + RedirectLogging + org.apache.solr.servlet.RedirectServlet + + destination + ${context}/#/~logging + + + + + SolrRestApi + org.restlet.ext.servlet.ServerServlet + + org.restlet.application + org.apache.solr.rest.SolrSchemaRestApi + + + + + RedirectOldAdminUI + /admin/ + + + RedirectOldAdminUI + /admin + + + RedirectOldZookeeper + /zookeeper.jsp + + + RedirectOldZookeeper + /zookeeper + + + RedirectLogging + /logging + + + + LoadAdminUI + /old.html + + + + LoadAdminUI + /index.html + + + + SolrRestApi + /schema/* + + + + .xsl + + application/xslt+xml + + + + index.html + + + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/weblogic.xml b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/weblogic.xml new file mode 100644 index 0000000000..43809eea47 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/WEB-INF/weblogic.xml @@ -0,0 +1,28 @@ + + + + + + false + + + + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/analysis.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/analysis.css new file mode 100644 index 0000000000..800964e5fa --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/analysis.css @@ -0,0 +1,304 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #analysis-holder +{ + background-image: url( ../../img/div.gif ); + background-position: 50% 0; + background-repeat: repeat-y; +} + +#content #analysis #field-analysis +{ + margin-bottom: 0; +} + +#content #analysis #field-analysis .content +{ + padding-bottom: 0; +} + +#content #analysis .settings-holder +{ + clear: both; + padding-top: 15px; +} + +#content #analysis .settings +{ + background-color: #fff; + border-top: 1px solid #fafafa; + border-bottom: 1px solid #fafafa; + padding-top: 10px; + padding-bottom: 10px; +} + +#content #analysis .settings select.loader +{ + background-position: 3px 50%; + padding-left: 21px; +} + +#content #analysis .settings select optgroup +{ + font-style: normal; + padding: 5px; +} + +#content #analysis .settings select option +{ + padding-left: 10px; +} + +#content #analysis .settings #tor_schema +{ + background-image: url( ../../img/ico/question-white.png ); + background-position: 0 50%; + color: #c0c0c0; + margin-left: 5px; + padding-left: 21px; +} + +#content #analysis .settings #tor_schema:hover +{ + background-image: url( ../../img/ico/question.png ); +} + +#content #analysis .settings #tor_schema span +{ +// display: none; +} + +#content #analysis .settings #tor_schema:hover span +{ + display: inline; +} + +#content #analysis .settings .buttons +{ + float: right; + width: 47%; +} + +#content #analysis .settings button +{ + float: right; +} + +#content #analysis .settings button span +{ + background-image: url( ../../img/ico/funnel.png ); +} + +#content #analysis .settings .verbose_output +{ + float: left; + width: auto; +} + +#content #analysis .settings .verbose_output a +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #999; + display: block; + padding-left: 21px; +} + +#content #analysis .settings .verbose_output.active a +{ + background-image: url( ../../img/ico/ui-check-box.png ); +} + +#content #analysis .index label, +#content #analysis .query label +{ + display: block; +} + +#content #analysis .index textarea, +#content #analysis .query textarea +{ + display: block; + width: 100%; +} + +#content #analysis .index +{ + float: left; + margin-right: 0.5%; + min-width: 47%; + max-width: 99%; +} + +#content #analysis .query +{ + float: right; + margin-left: 0.5%; + min-width: 47%; + max-width: 99%; +} + +#content #analysis .analysis-error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #analysis .analysis-error .head a +{ + color: #fff; + cursor: auto; +} + +#content #analysis #analysis-result +{ + overflow: auto; +} + +#content #analysis #analysis-result .index, +#content #analysis #analysis-result .query +{ + background-color: #fff; + padding-top: 20px; +} + +#content #analysis #analysis-result table +{ + border-collapse: collapse; +} + +#content #analysis #analysis-result td +{ + vertical-align: top; + white-space: nowrap; +} + +#content #analysis #analysis-result td.part.analyzer div, +#content #analysis #analysis-result td.part.spacer .holder, +#content #analysis #analysis-result td td td +{ + padding-top: 1px; + padding-bottom: 1px; +} + +#content #analysis #analysis-result.verbose_output td.legend +{ + display: table-cell; +} + +#content #analysis #analysis-result.verbose_output td.data tr.verbose_output +{ + display: table-row; +} + +#content #analysis #analysis-result .match +{ + background-color: #e9eff7; + background-color: #f2f2ff; +} + +#content #analysis #analysis-result td.part +{ + padding-bottom: 10px; +} + +#content #analysis #analysis-result td.part.analyzer div +{ + border-right: 1px solid #f0f0f0; + padding-right: 10px; +} + +#content #analysis #analysis-result td.part.analyzer abbr +{ + color: #c0c0c0; +} + +#content #analysis #analysis-result td.part.legend .holder, +#content #analysis #analysis-result td.part.data .holder +{ + padding-left: 10px; + padding-right: 10px; + border-right: 1px solid #c0c0c0; +} + +#content #analysis #analysis-result td.part.legend td +{ + color: #c0c0c0; +} + +#content #analysis #analysis-result td.part.legend .holder +{ + border-right-color: #f0f0f0; +} + +#content #analysis #analysis-result td.part.data:last-child .holder +{ + padding-right: 0; + border-right: 0; +} + +#content #analysis #analysis-result td.details +{ + padding-left: 10px; + padding-right: 10px; + border-left: 1px solid #f0f0f0; + border-right: 1px solid #f0f0f0; +} + +#content #analysis #analysis-result td.details:first-child +{ + padding-left: 0; + border-left: 0; +} + +#content #analysis #analysis-result td.details:last-child +{ + padding-right: 0; + border-right: 0; +} + +#content #analysis #analysis-result td.details tr.empty td +{ + color: #f0f0f0; +} + +#content #analysis #analysis-result td.details tr.raw_bytes td +{ + letter-spacing: -1px; +} + +#content #analysis #analysis-result .part table table td +{ + border-top: 1px solid #f0f0f0; +} + +#content #analysis #analysis-result .part table table tr:first-child td +{ + border-top: 0; +} + +#content #analysis #field-analysis h2 { background-image: url( ../../img/ico/receipt.png ); } +#content #analysis .analysis-result h2 { background-image: url( ../../img/ico/receipt-invoice.png ); } diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/chosen.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/chosen.css new file mode 100644 index 0000000000..f7ae771216 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/chosen.css @@ -0,0 +1,465 @@ +/* + +Chosen + +- by Patrick Filler for Harvest http://getharvest.com +- Copyright (c) 2011-2013 by Harvest + +Available for use under the MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ +/*! +Chosen, a Select Box Enhancer for jQuery and Prototype +by Patrick Filler for Harvest, http://getharvest.com + +Version 1.3.0 +Full source at https://github.com/harvesthq/chosen +Copyright (c) 2011-2014 Harvest http://getharvest.com + +MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md +This file is generated by `grunt build`, do not edit it by hand. +*/ + +/* @group Base */ +.chosen-container { + position: relative; + display: inline-block; + vertical-align: middle; + font-size: 13px; + zoom: 1; + *display: inline; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.chosen-container * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.chosen-container .chosen-drop { + position: absolute; + top: 100%; + left: -9999px; + z-index: 1010; + width: 100%; + border: 1px solid #aaa; + border-top: 0; + background: #fff; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); +} +.chosen-container.chosen-with-drop .chosen-drop { + left: 0; +} +.chosen-container a { + cursor: pointer; +} + +/* @end */ +/* @group Single Chosen */ +.chosen-container-single .chosen-single { + position: relative; + display: block; + overflow: hidden; + padding: 0 0 0 8px; + height: 25px; + border: 1px solid #aaa; + border-radius: 5px; + background-color: #fff; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); + background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-clip: padding-box; + box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1); + color: #444; + text-decoration: none; + white-space: nowrap; + line-height: 24px; +} +.chosen-container-single .chosen-default { + color: #999; +} +.chosen-container-single .chosen-single span { + display: block; + overflow: hidden; + margin-right: 26px; + text-overflow: ellipsis; + white-space: nowrap; +} +.chosen-container-single .chosen-single-with-deselect span { + margin-right: 38px; +} +.chosen-container-single .chosen-single abbr { + position: absolute; + top: 6px; + right: 26px; + display: block; + width: 12px; + height: 12px; + background: url('../../img/chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; +} +.chosen-container-single .chosen-single abbr:hover { + background-position: -42px -10px; +} +.chosen-container-single.chosen-disabled .chosen-single abbr:hover { + background-position: -42px -10px; +} +.chosen-container-single .chosen-single div { + position: absolute; + top: 0; + right: 0; + display: block; + width: 18px; + height: 100%; +} +.chosen-container-single .chosen-single div b { + display: block; + width: 100%; + height: 100%; + background: url('../../img/chosen-sprite.png') no-repeat 0px 2px; +} +.chosen-container-single .chosen-search { + position: relative; + z-index: 1010; + margin: 0; + padding: 3px 4px; + white-space: nowrap; +} +.chosen-container-single .chosen-search input[type="text"] { + margin: 1px 0; + padding: 4px 20px 4px 5px; + width: 100%; + height: auto; + outline: 0; + border: 1px solid #aaa; + background: white url('../../img/chosen-sprite.png') no-repeat 100% -20px; + background: url('../../img/chosen-sprite.png') no-repeat 100% -20px; + font-size: 1em; + font-family: sans-serif; + line-height: normal; + border-radius: 0; +} +.chosen-container-single .chosen-drop { + margin-top: -1px; + border-radius: 0 0 4px 4px; + background-clip: padding-box; +} +.chosen-container-single.chosen-container-single-nosearch .chosen-search { + position: absolute; + left: -9999px; +} + +/* @end */ +/* @group Results */ +.chosen-container .chosen-results { + color: #444; + position: relative; + overflow-x: hidden; + overflow-y: auto; + margin: 0 4px 4px 0; + padding: 0 0 0 4px; + max-height: 240px; + -webkit-overflow-scrolling: touch; +} +.chosen-container .chosen-results li { + display: none; + margin: 0; + padding: 5px 6px; + list-style: none; + line-height: 15px; + word-wrap: break-word; + -webkit-touch-callout: none; +} +.chosen-container .chosen-results li.active-result { + display: list-item; + cursor: pointer; +} +.chosen-container .chosen-results li.disabled-result { + display: list-item; + color: #ccc; + cursor: default; +} +.chosen-container .chosen-results li.highlighted { + background-color: #3875d7; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); + background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); + color: #fff; +} +.chosen-container .chosen-results li.no-results { + color: #777; + display: list-item; + background: #f4f4f4; +} +.chosen-container .chosen-results li.group-result { + display: list-item; + font-weight: bold; + cursor: default; +} +.chosen-container .chosen-results li.group-option { + padding-left: 15px; +} +.chosen-container .chosen-results li em { + font-style: normal; + text-decoration: underline; +} + +/* @end */ +/* @group Multi Chosen */ +.chosen-container-multi .chosen-choices { + position: relative; + overflow: hidden; + margin: 0; + padding: 0 5px; + width: 100%; + height: auto !important; + height: 1%; + border: 1px solid #aaa; + background-color: #fff; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: linear-gradient(#eeeeee 1%, #ffffff 15%); + cursor: text; +} +.chosen-container-multi .chosen-choices li { + float: left; + list-style: none; +} +.chosen-container-multi .chosen-choices li.search-field { + margin: 0; + padding: 0; + white-space: nowrap; +} +.chosen-container-multi .chosen-choices li.search-field input[type="text"] { + margin: 1px 0; + padding: 0; + height: 25px; + outline: 0; + border: 0 !important; + background: transparent !important; + box-shadow: none; + color: #999; + font-size: 100%; + font-family: sans-serif; + line-height: normal; + border-radius: 0; +} +.chosen-container-multi .chosen-choices li.search-choice { + position: relative; + margin: 3px 5px 3px 0; + padding: 3px 20px 3px 5px; + border: 1px solid #aaa; + max-width: 100%; + border-radius: 3px; + background-color: #eeeeee; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-size: 100% 19px; + background-repeat: repeat-x; + background-clip: padding-box; + box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05); + color: #333; + line-height: 13px; + cursor: default; +} +.chosen-container-multi .chosen-choices li.search-choice span { + word-wrap: break-word; +} +.chosen-container-multi .chosen-choices li.search-choice .search-choice-close { + position: absolute; + top: 4px; + right: 3px; + display: block; + width: 12px; + height: 12px; + background: url('../../img/chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; +} +.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover { + background-position: -42px -10px; +} +.chosen-container-multi .chosen-choices li.search-choice-disabled { + padding-right: 5px; + border: 1px solid #ccc; + background-color: #e4e4e4; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + color: #666; +} +.chosen-container-multi .chosen-choices li.search-choice-focus { + background: #d4d4d4; +} +.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close { + background-position: -42px -10px; +} +.chosen-container-multi .chosen-results { + margin: 0; + padding: 0; +} +.chosen-container-multi .chosen-drop .result-selected { + display: list-item; + color: #ccc; + cursor: default; +} + +/* @end */ +/* @group Active */ +.chosen-container-active .chosen-single { + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); +} +.chosen-container-active.chosen-with-drop .chosen-single { + border: 1px solid #aaa; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); + box-shadow: 0 1px 0 #fff inset; +} +.chosen-container-active.chosen-with-drop .chosen-single div { + border-left: none; + background: transparent; +} +.chosen-container-active.chosen-with-drop .chosen-single div b { + background-position: -18px 2px; +} +.chosen-container-active .chosen-choices { + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); +} +.chosen-container-active .chosen-choices li.search-field input[type="text"] { + color: #222 !important; +} + +/* @end */ +/* @group Disabled Support */ +.chosen-disabled { + opacity: 0.5 !important; + cursor: default; +} +.chosen-disabled .chosen-single { + cursor: default; +} +.chosen-disabled .chosen-choices .search-choice .search-choice-close { + cursor: default; +} + +/* @end */ +/* @group Right to Left */ +.chosen-rtl { + text-align: right; +} +.chosen-rtl .chosen-single { + overflow: visible; + padding: 0 8px 0 0; +} +.chosen-rtl .chosen-single span { + margin-right: 0; + margin-left: 26px; + direction: rtl; +} +.chosen-rtl .chosen-single-with-deselect span { + margin-left: 38px; +} +.chosen-rtl .chosen-single div { + right: auto; + left: 3px; +} +.chosen-rtl .chosen-single abbr { + right: auto; + left: 26px; +} +.chosen-rtl .chosen-choices li { + float: right; +} +.chosen-rtl .chosen-choices li.search-field input[type="text"] { + direction: rtl; +} +.chosen-rtl .chosen-choices li.search-choice { + margin: 3px 5px 3px 0; + padding: 3px 5px 3px 19px; +} +.chosen-rtl .chosen-choices li.search-choice .search-choice-close { + right: auto; + left: 4px; +} +.chosen-rtl.chosen-container-single-nosearch .chosen-search, +.chosen-rtl .chosen-drop { + left: 9999px; +} +.chosen-rtl.chosen-container-single .chosen-results { + margin: 0 0 4px 4px; + padding: 0 4px 0 0; +} +.chosen-rtl .chosen-results li.group-option { + padding-right: 15px; + padding-left: 0; +} +.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div { + border-right: none; +} +.chosen-rtl .chosen-search input[type="text"] { + padding: 4px 5px 4px 20px; + background: white url('../../img/chosen-sprite.png') no-repeat -30px -20px; + background: url('../../img/chosen-sprite.png') no-repeat -30px -20px; + direction: rtl; +} +.chosen-rtl.chosen-container-single .chosen-single div b { + background-position: 6px 2px; +} +.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b { + background-position: -12px 2px; +} + +/* @end */ +/* @group Retina compatibility */ +@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) { + .chosen-rtl .chosen-search input[type="text"], + .chosen-container-single .chosen-single abbr, + .chosen-container-single .chosen-single div b, + .chosen-container-single .chosen-search input[type="text"], + .chosen-container-multi .chosen-choices .search-choice .search-choice-close, + .chosen-container .chosen-results-scroll-down span, + .chosen-container .chosen-results-scroll-up span { + background-image: url('../../img/chosen-sprite-2x.png') !important; + background-size: 52px 37px !important; + background-repeat: no-repeat !important; + } +} +/* @end */ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/cloud.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/cloud.css new file mode 100644 index 0000000000..4017c22168 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/cloud.css @@ -0,0 +1,412 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #cloud +{ + position: relative; +} + +#content #cloud .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #cloud #error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 12px; + color: #fff; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #cloud #error .msg +{ + font-style: italic; + font-weight: normal; + margin-top: 10px; +} + +#content #cloud #debug +{ + background-color: #fff; + box-shadow: 0px 0px 10px #c0c0c0; + -moz-box-shadow: 0px 0px 10px #c0c0c0; + -webkit-box-shadow: 0px 0px 10px #c0c0c0; + padding: 20px; + position: absolute; + left: 50px; + top: 10px; +} + +#content #cloud #debug ul +{ + margin-bottom: 5px; +} + +#content #cloud #debug ul a +{ + background-position: 4px 50%; + border-right: 0; + display: block; + padding: 2px 4px; + padding-left: 25px; +} + +#content #cloud #debug ul a:hover, +#content #cloud #debug ul a.hover +{ + background-color: #f0f0f0; +} + +#content #cloud #debug .clipboard +{ + float: left; + position: relative; +} + +#content #cloud #debug .clipboard a +{ + background-image: url( ../../img/ico/clipboard-paste.png ); + z-index: 98; +} + +#content #cloud #debug .clipboard a:hover, +#content #cloud #debug .clipboard a.hover, +#content #cloud #debug .clipboard.copied a +{ + background-image: url( ../../img/ico/clipboard-paste-document-text.png ); +} + +#content #cloud #debug .close +{ + float: right; +} + +#content #cloud #debug .close a +{ + background-image: url( ../../img/ico/cross-0.png ); + padding-left: 21px; +} + +#content #cloud #debug .close a:hover +{ + background-image: url( ../../img/ico/cross-1.png ); +} + +#content #cloud #debug .debug +{ + border: 1px solid #f0f0f0; + max-height: 350px; + overflow: auto; + padding: 5px; + width: 500px; +} + +#content #cloud #debug .debug .loader +{ + background-position: 5px 50%; + display: block; + padding: 10px 26px; +} + +#content #cloud .content +{ + padding-left: 0; + padding-right: 0; +} + +#content #cloud .content.show +{ + background-image: url( ../../img/div.gif ); + background-repeat: repeat-y; + background-position: 31% 0; +} + +#content #cloud #tree +{ + float: left; + width: 30%; +} + +#content #cloud .show #tree +{ + overflow: hidden; +} + +#content #cloud #file-content +{ + float: right; + position: relative; + width: 68%; + min-height: 100px +} + +#content #cloud .show #file-content +{ + display: block; +} + +#content #cloud #file-content .close +{ + background-image: url( ../../img/ico/cross-0.png ); + background-position: 50% 50%; + display: block; + height: 20px; + position: absolute; + right: 0; + top: 0; + width: 20px; +} + +#content #cloud #file-content .close:hover +{ + background-image: url( ../../img/ico/cross-1.png ); +} + +#content #cloud #file-content #toggle.plus +{ + font-style: italic; + padding-left: 17px; + background-image: url( ../../img/ico/toggle-small-expand.png ); +} + +#content #cloud #file-content #toggle.minus +{ + font-style: italic; + padding-left: 17px; + background-image: url( ../../img/ico/toggle-small.png ); +} + +#content #cloud #file-content #data +{ + border-top: 1px solid #c0c0c0; + margin-top: 10px; + padding-top: 10px; +} + +#content #cloud #file-content #data pre +{ + display: block; + max-height: 600px; + overflow: auto; +} + +#content #cloud #file-content #data em +{ + color: #c0c0c0; +} + +#content #cloud #file-content #prop +{ +} + +#content #cloud #file-content li +{ + padding-top: 3px; + padding-bottom: 3px; +} + +#content #cloud #file-content li.odd +{ + background-color: #F8F8F8; +} + +#content #cloud #file-content li dt +{ + float: left; + width: 19%; +} + +#content #cloud #file-content li dd +{ + float: right; + width: 80%; +} + +/* tree */ + +#content #cloud #legend +{ + border: 1px solid #f0f0f0; + padding: 10px; + position: absolute; + right: 0; + bottom: 0; +} + +#content #cloud #legend li +{ + padding-left: 15px; + position: relative; +} + +#content #cloud #legend li svg +{ + position: absolute; + left: 0; + top: 2px; +} + +#content #graph-content +{ + min-height: 400px; +} + +#content #graph-content .node +{ + fill: #333; +} + +#content #cloud #legend circle, +#content #graph-content .node circle +{ + fill: #fff; + stroke: #c0c0c0; + stroke-width: 1.5px; +} + +#content #graph-content .node.lvl-3 text +{ + cursor: pointer; +} + +#content #graph-content .node.lvl-3:hover circle +{ + stroke: #000 !important; +} + +#content #graph-content .node.lvl-3:hover text +{ + fill: #000 !important; +} + +#content #graph-content .link +{ + fill: none; + stroke: #e0e0e0; + stroke-width: 1.5px; +} + +#content #cloud #legend .gone circle, +#content #graph-content .node.gone circle, +#content #graph-content .link.gone +{ + stroke: #f0f0f0; +} + +#content #graph-content .node.gone text +{ + fill: #f0f0f0; +} + +#content #cloud #legend ul .gone +{ + color: #e0e0e0; +} + +#content #cloud #legend .recovery_failed, +#content #cloud #legend .recovery_failed circle, +#content #graph-content .node.recovery_failed circle +{ + color: #C43C35; + stroke: #C43C35; +} + +#content #graph-content .node.recovery_failed text +{ + fill: #C43C35; +} + +#content #cloud #legend .down, +#content #cloud #legend .down circle, +#content #graph-content .node.down circle +{ + color: #c48f00; + stroke: #c48f00; +} + +#content #graph-content .node.down text +{ + fill: #c48f00; +} + +#content #cloud #legend .recovering, +#content #cloud #legend .recovering circle, +#content #graph-content .node.recovering circle +{ + color: #d5dd00; + stroke: #d5dd00; +} + +#content #graph-content .node.recovering text +{ + fill: #d5dd00; +} + +#content #cloud #legend .active, +#content #cloud #legend .active circle, +#content #graph-content .node.active circle +{ + color: #57A957; + stroke: #57A957; +} + +#content #graph-content .node.active text +{ + fill: #57A957; +} + +#content #cloud #legend .leader circle, +#content #graph-content .node.leader circle +{ + fill: #000; +} + +#content #cloud #legend .leader circle +{ + stroke: #fff; +} + +#content #graph-content .link.lvl-2, +#content #graph-content .link.leader +{ + stroke: #c0c0c0; +} + +#content #graph-content .node.lvl-0 circle +{ + stroke: #fff; +} + +#content #graph-content .link.lvl-1 +{ + stroke: #fff; +} + +#cloudGraphPaging +{ + display: inline-block; + padding-top: 15px; + padding-bottom: 15px; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/collections.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/collections.css new file mode 100644 index 0000000000..7c2e0a697b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/collections.css @@ -0,0 +1,353 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #collections +{ + position: relative; +} + +#content #collections #ui-block +{ + background-color: #fff; + height: 200px; + position: absolute; + left: -5px; + top: 35px; + width: 500px; +} + +#content #collections #frame +{ + float: right; + width: 86%; +} + +#content #collections #navigation +{ + padding-top: 50px; + width: 12%; +} + +#content #collections #navigation a +{ + padding-left: 5px; +} + +#content #collections #frame .actions +{ + margin-bottom: 20px; + min-height: 30px; +} + +#content #collections .actions div.action +{ + width: 320px; +} + +#content #collections .actions div.action .cloud +{ +} + +#content #collections .actions form .directory-note +{ + background-image: url( ../../img/ico/information-white.png ); + background-position: 22% 1px; + color: #c0c0c0; +} + +#content #collections .actions form .error +{ + background-image: url( ../../img/ico/cross-button.png ); + background-position: 22% 1px; + color: #c00; + font-weight: bold; +} + +#content #collections .actions form p +{ + padding-bottom: 8px; +} + +#content #collections .actions form label +{ + float: left; + padding-top: 3px; + padding-bottom: 3px; + text-align: right; + width: 25%; +} + +#content #collections .actions form input, +#content #collections .actions form select, +#content #collections .actions form .chosen-container +#content #collections .actions form .buttons, +#content #collections .actions form .note span +{ + float: right; + width: 71%; +} + +#content #collections .actions form .note span +{ + padding-left: 3px; + padding-right: 3px; +} + +#content #collections .actions form .buttons +{ + padding-top: 10px; +} + +#content #collections .actions form button.submit +{ + margin-right: 20px; +} + +#content #collections .actions form button.submit span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #collections .actions form button.reset span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #collections .actions #add +{ + left: 0; + position: absolute; +} + +#content #collections .actions #add span +{ + background-image: url( ../../img/ico/plus-button.png ); +} + +#content #collections .actions #delete +{ + margin-right: 20px; +} + +#content #collections .actions #delete span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #collections .actions #reload span +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} + +#content #collections .actions #rename span +{ + background-image: url( ../../img/ico/ui-text-field-select.png ); +} + +#content #collections .actions #create-alias span +{ + background-image: url( ../../img/ico/arrow-switch.png ); +} + +#content #collections .actions #delete-alias span +{ + background-image: url( ../../img/ico/cross-button.png ); +} + +#content #collections .actions #optimize span +{ + background-image: url( ../../img/ico/hammer-screwdriver.png ); +} + +#content #collections .actions div.action +{ + background-color: #fff; + border: 1px solid #f0f0f0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + position: absolute; + left: 50px; + top: 40px; + padding: 10px; +} + +#content #collections .actions #add-replica span +{ + background-image: url( ../../img/ico/plus-button.png ); +} + +#content #collections div.action.add-replica { + border: 1px solid #f0f0f0; + width: 400px; + margin-right: 0px; + padding: 10px; + float: right; +} + +#content #collections div.action.add-replica p { + padding-bottom: 8px; +} + +#content #collections div.action.add-replica .buttons { + float: right; +} + +#content #collections div.action.add-replica .buttons .submit span { + background-image: url( ../../img/ico/tick.png ); + background-position: 0% 50%; +} + +#content #collections div.action.add-replica .buttons .reset span { + background-image: url( ../../img/ico/cross.png ); + background-position: 0% 50%; +} + +#content #collections #data #collection-data h2 { background-image: url( ../../img/ico/box.png ); } +#content #collections #data #shard-data h2 { background-image: url( ../../img/ico/sitemap.png ); } +#content #collections #data #shard-data .replica h2 { background-image: url( ../../img/ico/node-slave.png ); } + +#content #collections #data #index-data +{ + margin-top: 10px; +} + +#content #collections #data li +{ + padding-bottom: 3px; + padding-top: 3px; +} + +#content #collections #data li.odd +{ + background-color: #f8f8f8; +} + +#content #collections #data li dt +{ + float: left; + width: 50%; +} + +#content #collections #data li dd +{ + float: right; + width: 50%; +} + +#content #collections #data li dd.ico +{ + background-image: url( ../../img/ico/slash.png ); + height: 20px; +} + +#content #collections #data li dd.ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #collections #data li dd.ico span +{ +} + +#content #collections #add_advanced { + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; +} + +#content #collections #add_advanced.open { + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #collections .shard { + margin-left: 40px; +} + +#content #collections .replica { + margin-left: 40px; +} + +#content #collections .shard h2 span.openReplica { + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; +} + +#content #collections .shard h2 span.openReplica .open { + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #collections .replica h2 span { + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; +} + +#content #collections .replica h2 span.rem { + background-image: url( ../../img/ico/cross.png ); + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; + right:10px; +} + +#content #collections .replica h2 span .open { + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #collections #add-replica { + float: right; +} + +#content #collections .add select { + width: 100%; +} + +#content #collections .chosen-container ul { + width: 100%; + padding: 5px; +} + +#content #collections .delete-replica span +{ + background-image: url( ../../img/ico/cross.png ); +} +#content #collections .delete-replica button.submit span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #collections #node-name .chosen-container +{ + width: 100% !important; +} + +#content #collections #collection-data { + float: left; + width: 35%; +} + +#content #collections #shard-data { + float: left; + width: 65%; +} \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/common.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/common.css new file mode 100644 index 0000000000..d9604464d6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/common.css @@ -0,0 +1,768 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +* +{ + background-repeat: no-repeat; + margin: 0; + padding: 0; +} + +body, h1, h2, h3, h4, h5, h6, a, button, input, select, option, textarea, th, td +{ + color: #333; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} + +body +{ + padding: 30px; + text-align: center; +} + +a, button +{ + cursor: pointer; +} + +input, select, textarea +{ + border: 1px solid #c0c0c0; + padding: 2px; +} + +input[readonly=readonly] +{ + border-color: #f0f0f0; +} + +button +{ + background-color: #e6e6e6; + background-repeat: no-repeat; + background-image: -webkit-gradient( linear, 0 0, 0 100%, from( #ffffff ), color-stop( 25%, #ffffff ), to( #e6e6e6 ) ); + background-image: -webkit-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -moz-linear-gradient( top, #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -ms-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -o-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0 ); + border: 1px solid #ccc; + border-bottom-color: #bbb; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + -moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + color: #333; + cursor: pointer; + display: inline-block; + padding: 4px 7px 5px; + overflow: visible; + text-shadow: 0 1px 1px rgba( 255, 255, 255, 0.75 ); + -webkit-transition: 0.1s linear background-image; + -moz-transition: 0.1s linear background-image; + -ms-transition: 0.1s linear background-image; + -o-transition: 0.1s linear background-image; + transition: 0.1s linear background-image; +} + +button span +{ + background-position: 0 50%; + display: block; + padding-left: 21px; +} + +button[type=submit], button.primary +{ + background-color: #0064cd; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #049cdb ), to( #0064cd ) ); + background-image: -moz-linear-gradient( top, #049cdb, #0064cd ); + background-image: -ms-linear-gradient( top, #049cdb, #0064cd ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #049cdb ), color-stop( 100%, #0064cd ) ); + background-image: -webkit-linear-gradient( top, #049cdb, #0064cd ); + background-image: -o-linear-gradient( top, #049cdb, #0064cd ); + background-image: linear-gradient( top, #049cdb, #0064cd ); + border-color: #0064cd #0064cd #003f81; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + color: #ffffff; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0 ); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +button.success +{ + background-color: #57a957; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #62c462 ), to( #57a957 ) ); + background-image: -moz-linear-gradient( top, #62c462, #57a957 ); + background-image: -ms-linear-gradient( top, #62c462, #57a957 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #62c462 ), color-stop( 100%, #57a957 ) ); + background-image: -webkit-linear-gradient( top, #62c462, #57a957 ); + background-image: -o-linear-gradient( top, #62c462, #57a957 ); + background-image: linear-gradient( top, #62c462, #57a957 ); + border-color: #57a957 #57a957 #3d773d; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#62c462', endColorstr='#57a957', GradientType=0 ); + color: #ffffff; + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} + +button.warn +{ + background-color: #c43c35; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #ee5f5b ), to( #c43c35 ) ); + background-image: -moz-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -ms-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #ee5f5b ), color-stop( 100%, #c43c35 ) ); + background-image: -webkit-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -o-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: linear-gradient( top, #ee5f5b, #c43c35 ); + border-color: #c43c35 #c43c35 #882a25; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + color: #ffffff; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0 ); + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} + +a +{ + text-decoration: none; +} + +pre +{ + color: #333; + text-align: left; +} + +abbr +{ + cursor: help; +} + +ul +{ + list-style: none; +} + +.clearfix:after { clear: both; content: "."; display: block; font-size: 0; height: 0; visibility: hidden; } +.clearfix { display: block; } + +.loader +{ + background-image: url( ../../img/loader.gif ) !important; +} + +.loader-light +{ + background-image: url( ../../img/loader-light.gif ) !important; +} + +.universal-loader { + position: absolute; + left: -16px; + top: 0px; + width: 16px; + height: 16px; +} + +#wrapper +{ + position: relative; + margin: 0 auto; + margin-bottom: 30px; + text-align: left; +} + +#header +{ + padding-bottom: 10px; + position: fixed; + z-index: 42; +} + +.scroll #header +{ + position: absolute; +} + +#header #solr +{ + background-image: url( ../../img/solr.svg ); + background-size: 128px; + display: block; + height: 78px; + width: 150px; +} + +#header #solr span +{ + display: none; +} + +#main +{ + min-width: 750px; + position: relative; +} + +#main.error +{ + border: 0; + min-height: 0; + padding-top: 20px; +} + +#main.error .message +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + font-weight: bold; + margin-left: 150px; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#main.error .code +{ + border: 1px solid #c0c0c0; + padding: 5px; +} + +#meta +{ + position: absolute; + bottom: -26px; + right: 0; +} + +#meta li +{ + float: left; +} + +#meta li a +{ + background-position: 10px 50%; + display: block; + height: 25px; + line-height: 25px; + padding-left: 31px; + padding-right: 10px; +} + +#meta li a:hover +{ + background-color: #f0f0f0; +} + +#meta .documentation a { background-image: url( ../../img/ico/document-text.png ); } +#meta .issues a { background-image: url( ../../img/ico/bug.png ); } +#meta .irc a { background-image: url( ../../img/ico/users.png ); } +#meta .mailinglist a { background-image: url( ../../img/ico/mail.png ); } +#meta .wiki-query-syntax a { background-image: url( ../../img/ico/script-code.png ); } + +#environment +{ + background-image: url( ../../img/ico/box.png ); + background-position: 5px 50%; + display: none; + font-weight: bold; + margin-top: 10px; + padding: 5px 10px; + padding-left: 26px; +} + +.has-environment #environment +{ + display: block; +} + +#environment.prod +{ + background-color: #c37f7f; + color: #fff; +} + +#environment.test +{ + background-color: #f5f5b2; +} + +#environment.dev +{ + background-color: #cce7cc; +} + +.header-message +{ + border: 1px solid #f00; + margin-left: 150px; + margin-bottom: 20px; +} + +.header-message h2, +.header-message ul, +.header-message p +{ + padding: 10px; +} + +.header-message h2 +{ + background-color: #f00; + color: #fff; + font-weight: bold; +} + +.header-message p +{ + color: #c0c0c0; + padding-top: 0; +} + +#loading +#http-exception +{ + display: none; +} + +.exception +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content-wrapper +{ + margin-left: 150px; + border: 1px solid #c0c0c0; + min-height: 500px; +} + +#content +{ + padding: 10px; +} + +#content > .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content iframe +{ + border: 0; + display: block; + min-height: 400px; + width: 100%; +} + +#content .block +{ + margin-bottom: 10px; +} + +#content .block h2 +{ + background-color: #fafafa; + background-position: 5px 50%; + border-bottom: 1px solid #f0f0f0; + font-weight: bold; + padding: 5px; + padding-left: 26px; +} + +#content .block.disabled, +#content .block.disabled h2 +{ + color: #c0c0c0; +} + +#content .block .message, +#content .block .content +{ + padding: 5px; +} + +/* syntax */ + +pre.syntax +{ + overflow: auto; +} + +pre.syntax code +{ + display: block; + color: #000; +} + +pre.syntax .comment, +pre.syntax .template_comment, +pre.syntax .diff .header, +pre.syntax .javadoc +{ + color: #998; + font-style: italic; +} + +pre.syntax .keyword, +pre.syntax .css .rule .keyword, +pre.syntax .winutils, +pre.syntax .javascript .title, +pre.syntax .lisp .title, +pre.syntax .subst +{ + color: #000; + font-weight: bold; +} + +pre.syntax .number, +pre.syntax .hexcolor +{ + color: #40a070; +} + +pre.syntax.language-json .number +{ + color: blue; +} + +pre.syntax.language-json .literal +{ + color: firebrick; +} + +pre.syntax .string, +pre.syntax .tag .value, +pre.syntax .phpdoc, +pre.syntax .tex .formula +{ + color: #d14; +} + +pre.syntax.language-json .string +{ + color: green; +} + +pre.syntax .title, +pre.syntax .id +{ + color: #900; + font-weight: bold; +} + +pre.syntax .javascript .title, +pre.syntax .lisp .title, +pre.syntax .subst +{ + font-weight: normal; +} + +pre.syntax .class .title, +pre.syntax .tex .command +{ + color: #458; + font-weight: bold; +} + +pre.syntax .tag, +pre.syntax .css .keyword, +pre.syntax .html .keyword, +pre.syntax .tag .title, +pre.syntax .django .tag .keyword +{ + color: #000080; + font-weight: normal; +} + +pre.syntax .attribute, +pre.syntax .variable, +pre.syntax .instancevar, +pre.syntax .lisp .body +{ + color: #008080; +} + +pre.syntax.language-json .attribute +{ + color: black; + font-weight: bold; +} + +pre.syntax .regexp +{ + color: #009926; +} + +pre.syntax .class +{ + color: #458; + font-weight: bold; +} + +pre.syntax .symbol, +pre.syntax .ruby .symbol .string, +pre.syntax .ruby .symbol .keyword, +pre.syntax .ruby .symbol .keymethods, +pre.syntax .lisp .keyword, +pre.syntax .tex .special +{ + color: #990073; +} + +pre.syntax .builtin, +pre.syntax .built_in, +pre.syntax .lisp .title +{ + color: #0086b3; +} + +pre.syntax .preprocessor, +pre.syntax .pi, +pre.syntax .doctype, +pre.syntax .shebang, +pre.syntax .cdata +{ + color: #999; + font-weight: bold; +} + +pre.syntax .deletion +{ + background: #fdd; +} + +pre.syntax .addition +{ + background: #dfd; +} + +pre.syntax .diff .change +{ + background: #0086b3; +} + +pre.syntax .chunk +{ + color: #aaa; +} + +pre.syntax .tex .formula +{ + opacity: 0.5; +} + +#content .tree li, +#content .tree ins +{ + background-color: transparent; + background-image: url( ../../img/tree.png ); + background-repeat: no-repeat; +} + +#content .tree li +{ + background-position: -54px 0; + background-repeat: repeat-y; + line-height: 22px; +} + +#content .tree li.jstree-last +{ + background:transparent; +} + +#content .tree .jstree-open > ins +{ + background-position: -36px 0; +} + +#content .tree .jstree-closed > ins +{ + background-position: -18px 0; +} + +#content .tree .jstree-leaf > ins +{ + background-position: 0 0; +} + +#content .tree .jstree-hovered +{ + background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; +} + +#content .tree .jstree-clicked +{ + background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; +} + +#content .tree a.active +{ + background-color: #f0f0f0; + color: #00f; +} + +#content .tree a .jstree-icon +{ + background-image: url( ../../img/ico/folder.png ); +} + +#content .tree .jstree-leaf a .jstree-icon +{ + background-image: url( ../../img/ico/document-text.png ); +} + +#content .tree .jstree-search +{ + font-style:italic; +} + +#content .tree a.jstree-search +{ + color:aqua; +} + +#connection-box +{ + display: none; +} + +#connection-status-modal +{ + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background-color: #e6e6e6; + opacity: 0.5; + z-index: 100; +} + +#connection-status-recovered: +{ + z-index:102; +} + +.connection-status +{ + position: absolute; + left: 200px; + right: 200px; + top: 40%; + height: 75px; + border: 1px solid #f00; + padding: 30px; + background-color: #fff; + opacity: 1; + z-index: 101; +} + +.connection-status p +{ + background-image: url( ../../img/ico/network-status-busy.png ); + background-position: 0 50%; + color: #800; + padding-left: 26px; +} + +#connection-status-recovered p +{ + color: #080; + background-image: url( ../../img/ico/network-status.png ); +} + +#content .address-bar +{ + margin-bottom: 10px; + background-image: url( ../../img/ico/ui-address-bar.png ); + background-position: 5px 50%; + border: 1px solid #f0f0f0; + box-shadow: 1px 1px 0 #f0f0f0; + -moz-box-shadow: 1px 1px 0 #f0f0f0; + -webkit-box-shadow: 1px 1px 0 #f0f0f0; + color: #c0c0c0; + display: block; + overflow: hidden; + padding: 5px; + padding-left: 26px; + white-space: nowrap; +} + +#content .address-bar:focus, +#content .address-bar:hover +{ + border-color: #c0c0c0; + box-shadow: 1px 1px 0 #d8d8d8; + -moz-box-shadow: 1px 1px 0 #d8d8d8; + -webkit-box-shadow: 1px 1px 0 #d8d8d8; + color: #333; +} + +.exception .show-exception { + margin-top: 4px; + display: block; + position: absolute; + right: 10px; + top: 7px; + color: #fff; +} + +#exception .show-exception a:hover { + color: #333; +} + +.other-ui-link { + margin: 0px; + position: absolute; + right: 0px; + top: -20px; +} + +.other-ui-link span, +.new-ui-warning span.help { + background-image: url( ../../img/ico/information-white.png ); + right: 0px; + padding-left: 16px; +} + +.other-ui-link a.ul { + text-decoration: underline; +} + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/cores.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/cores.css new file mode 100644 index 0000000000..96e6f96804 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/cores.css @@ -0,0 +1,233 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #cores +{ + position: relative; +} + +#content #cores #ui-block +{ + background-color: #fff; + height: 200px; + position: absolute; + left: -5px; + top: 35px; + width: 500px; +} + +#content #cores #frame +{ + float: right; + width: 86%; +} + +#content #cores #navigation +{ + padding-top: 50px; + width: 12%; +} + +#content #cores #navigation a +{ + padding-left: 5px; +} + +#content #cores #frame .actions +{ + margin-bottom: 20px; + min-height: 30px; +} + +#content #cores .actions div.action +{ + width: 320px; +} + +#content #cores .actions div.action .cloud +{ +} + +#content #cores .actions form .directory-note +{ + background-image: url( ../../img/ico/information-white.png ); + background-position: 22% 1px; + color: #c0c0c0; +} + +#content #cores .actions form .error +{ + background-image: url( ../../img/ico/cross-button.png ); + background-position: 22% 1px; + color: #c00; + font-weight: bold; +} + +#content #cores .actions form p +{ + padding-bottom: 8px; +} + +#content #cores .actions form label +{ + float: left; + padding-top: 3px; + padding-bottom: 3px; + text-align: right; + width: 25%; +} + +#content #cores .actions form input, +#content #cores .actions form select, +#content #cores .actions form .buttons, +#content #cores .actions form .note span +{ + float: right; + width: 71%; +} + +#content #cores .actions form .note span +{ + padding-left: 3px; + padding-right: 3px; +} + +#content #cores .actions form .buttons +{ + padding-top: 10px; +} + +#content #cores .actions form button.submit +{ + margin-right: 20px; +} + +#content #cores .actions form button.submit span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #cores .actions form button.reset span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #cores .actions #add +{ + left: 0; + position: absolute; +} + +#content #cores .actions #add span +{ + background-image: url( ../../img/ico/plus-button.png ); +} + +#content #cores .actions #unload +{ + margin-right: 20px; +} + +#content #cores .actions #unload span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #cores .actions #reload span +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} + +#content #cores .actions #rename span +{ + background-image: url( ../../img/ico/ui-text-field-select.png ); +} + +#content #cores .actions #swap span +{ + background-image: url( ../../img/ico/arrow-switch.png ); +} + +#content #cores .actions #optimize +{ +} + +#content #cores .actions #optimize span +{ + background-image: url( ../../img/ico/hammer-screwdriver.png ); +} + +#content #cores .actions div.action +{ + background-color: #fff; + border: 1px solid #f0f0f0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + position: absolute; + left: -50px; + top: 40px; + padding: 10px; +} + +#content #cores #data #core-data h2 { background-image: url( ../../img/ico/box.png ); } +#content #cores #data #index-data h2 { background-image: url( ../../img/ico/chart.png ); } + +#content #cores #data #index-data +{ + margin-top: 10px; +} + +#content #cores #data li +{ + padding-bottom: 3px; + padding-top: 3px; +} + +#content #cores #data li.odd +{ + background-color: #f8f8f8; +} + +#content #cores #data li dt +{ + float: left; + width: 17%; +} + +#content #cores #data li dd +{ + float: right; + width: 82%; +} + +#content #cores #data li dd.ico +{ + background-image: url( ../../img/ico/slash.png ); + height: 20px; +} + +#content #cores #data li dd.ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #cores #data li dd.ico span +{ +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/dashboard.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/dashboard.css new file mode 100644 index 0000000000..c681bc862a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/dashboard.css @@ -0,0 +1,185 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #dashboard .block +{ + background-image: none; + width: 49%; +} + +#content #dashboard .fieldlist +{ + float: left; +} + +#content #dashboard .fieldlist dt, +#content #dashboard .fieldlist dd +{ + display: block; + float: left; +} + +#content #dashboard .fieldlist dt +{ + clear: left; + margin-right: 2%; + text-align: right; + width: 23%; +} + +#content #dashboard .fieldlist dd +{ + width: 74%; +} + +#content #dashboard .fieldlist .index_optimized +{ + margin-top: 10px; +} + +#content #dashboard .fieldlist .ico +{ + background-image: url( ../../img/ico/slash.png ); + height: 20px; +} + +#content #dashboard .fieldlist .ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dashboard .fieldlist .ico span +{ + display: none; +} + +#content #dashboard #statistics .index_optimized.value a +{ + display: none; +} + +#content #dashboard #statistics .index_optimized.value.ico-0 a +{ + background-color: #f0f0f0; + background-image: url( ../../img/ico/hammer-screwdriver.png ); + background-position: 5px 50%; + border: 1px solid #c0c0c0; + display: block; + float: left; + margin-left: 50px; + padding: 1px 5px; + padding-left: 26px; +} + +#content #dashboard #statistics .index_has-deletions +{ + display: none; +} + +#content #dashboard #statistics .index_has-deletions.value.ico-0 +{ + background-image: url( ../../img/ico/tick-red.png ); +} + +#content #dashboard #replication +{ + float: left; +} + +#content #dashboard #replication .is-replicating +{ + background-position: 99% 50%; + display: block; +} + +#content #dashboard #replication #details table thead td span +{ + display: none; +} + +#content #dashboard #instance +{ + float: right; +} + +#content #dashboard #instance .dir_impl +{ + margin-top: 10px; +} + +#content #dashboard #admin-extra +{ + float: left; +} + +#content #dashboard #healthcheck +{ + float: right; +} + +#content #dashboard #healthcheck .ico +{ + background-image: url( ../../img/ico/slash.png ); + height: 20px; + padding-left: 20px; + width: 60%; +} + +#content #dashboard #healthcheck .ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dashboard #system h2 { background-image: url( ../../img/ico/server.png ); } +#content #dashboard #statistics h2 { background-image: url( ../../img/ico/chart.png ); } +#content #dashboard #replication h2 { background-image: url( ../../img/ico/node.png ); } +#content #dashboard #replication.master h2 { background-image: url( ../../img/ico/node-master.png ); } +#content #dashboard #replication.slave h2 { background-image: url( ../../img/ico/node-slave.png ); } +#content #dashboard #instance h2 { background-image: url( ../../img/ico/server.png ); } +#content #dashboard #admin-extra h2 { background-image: url( ../../img/ico/plus-button.png ); } +#content #dashboard #collection h2 { background-image: url( ../../img/ico/book-open-text.png ); } +#content #dashboard #shards h2 { background-image: url( ../../img/ico/documents-stack.png ); } + +#content #dashboard #shards { margin-left: 20px;} + +#dashboard #shards .shard h3.shard-title { + display: block; + background-color: #c8c8c8; + font-weight: bold; + padding: 3px; + padding-left: 30px; + margin-left: 20px; + margin-top: 20px; + background-image: url( ../../img/ico/document-text.png ); + background-position-x: 10px; + background-position-y: 3px; +} + +#dashboard #shards .shard .shard-detail { + margin-bottom: 25px; + margin-top: 7px; +} + +#dashboard #shards .shard .replica { + background-color: #e4e4e4; +} + +#dashboard #shards .shard .replica.odd { + background-color: #fff; +} \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/dataimport.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/dataimport.css new file mode 100644 index 0000000000..97fc5c7425 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/dataimport.css @@ -0,0 +1,370 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #dataimport +{ + background-image: url( ../../img/div.gif ); + background-position: 21% 0; + background-repeat: repeat-y; +} + +#content #dataimport #frame +{ + float: right; + width: 78%; +} + +#content #dataimport #form +{ + float: left; + width: 20%; +} + +#content #dataimport #form #navigation +{ + border-right: 0; +} + +#content #dataimport #form #navigation a +{ + background-image: url( ../../img/ico/status-offline.png ); +} + +#content #dataimport #form #navigation .current a +{ + background-image: url( ../../img/ico/status.png ); +} + +#content #dataimport #form form +{ + border-top: 1px solid #f0f0f0; + margin-top: 10px; + padding-top: 5px; +} + +#content #dataimport #form label +{ + cursor: pointer; + display: block; + margin-top: 5px; +} + +#content #dataimport #form input, +#content #dataimport #form select, +#content #dataimport #form textarea +{ + margin-bottom: 2px; + width: 100%; +} + +#content #dataimport #form input +{ + width: 98%; +} + +#content #dataimport #form button +{ + margin-top: 10px; +} + +#content #dataimport #form .execute span +{ + background-image: url( ../../img/ico/document-import.png ); +} + +#content #dataimport #form .refresh-status span +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} + +#content #dataimport #form .refresh-status span.success +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dataimport #form #start +{ + float: left; + width: 47%; +} + +#content #dataimport #form #rows +{ + float: right; + width: 47%; +} + +#content #dataimport #form .checkbox input +{ + margin-bottom: 0; + width: auto; +} + +#content #dataimport #form #auto-refresh-status +{ + margin-top: 20px; +} + +#content #dataimport #form #auto-refresh-status a +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #c0c0c0; + display: block; + padding-left: 21px; +} + +#content #dataimport #form #auto-refresh-status a.on, +#content #dataimport #form #auto-refresh-status a:hover +{ + color: #333; +} + +#content #dataimport #form #auto-refresh-status a.on +{ + background-image: url( ../../img/ico/ui-check-box.png ); +} + +#content #dataimport #current_state +{ + padding: 10px; + margin-bottom: 20px; +} + +#content #dataimport #current_state .last_update, +#content #dataimport #current_state .info +{ + display: block; + padding-left: 21px; +} + +#content #dataimport #current_state .last_update +{ + color: #c0c0c0; + font-size: 11px; +} + +#content #dataimport #current_state .info +{ + background-position: 0 1px; + position: relative; +} + +#content #dataimport #current_state .info .details span +{ +# color: #c0c0c0; +} + +#content #dataimport #current_state .info .abort-import +{ + position: absolute; + right: 0px; + top: 0px; +} + +#content #dataimport #current_state .info .abort-import span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #dataimport #current_state .info .abort-import.success span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dataimport #current_state.indexing +{ + background-color: #f9f9f9; +} + +#content #dataimport #current_state.indexing .info +{ + background-image: url( ../../img/ico/hourglass.png ); +} + +#content #dataimport #current_state.indexing .info .abort-import +{ + display: block; +} + +#content #dataimport #current_state.success +{ + background-color: #e6f3e6; +} + +#content #dataimport #current_state.success .info +{ + background-image: url( ../../img/ico/tick-circle.png ); +} + +#content #dataimport #current_state.success .info strong +{ + color: #080; +} + +#content #dataimport #current_state.aborted +{ + background-color: #f3e6e6; +} + +#content #dataimport #current_state.aborted .info +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #dataimport #current_state.aborted .info strong +{ + color: #800; +} + +#content #dataimport #current_state.failure +{ + background-color: #f3e6e6; +} + +#content #dataimport #current_state.failure .info +{ + background-image: url( ../../img/ico/cross-button.png ); +} + +#content #dataimport #current_state.failure .info strong +{ + color: #800; +} + +#content #dataimport #current_state.idle +{ + background-color: #e6e6ff; +} + +#content #dataimport #current_state.idle .info +{ + background-image: url( ../../img/ico/information.png ); +} + +#content #dataimport #error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #dataimport .block h2 +{ + border-color: #c0c0c0; + padding-left: 5px; + position: relative; +} + +#content #dataimport .block.hidden h2 +{ + border-color: #fafafa; +} + +#content #dataimport .block h2 a.toggle +{ + background-image: url( ../../img/ico/toggle-small.png ); + background-position: 0 50%; + padding-left: 21px; +} + +#content #dataimport .block.hidden h2 a.toggle +{ + background-image: url( ../../img/ico/toggle-small-expand.png ); +} + +#content #dataimport #config h2 a.r +{ + background-position: 3px 50%; + display: block; + float: right; + margin-left: 10px; + padding-left: 24px; + padding-right: 3px; +} + +#content #dataimport #config h2 a.reload_config +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} + +#content #dataimport #config h2 a.reload_config.success +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dataimport #config h2 a.reload_config.error +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #dataimport #config h2 a.debug_mode +{ + background-image: url( ../../img/ico/hammer.png ); + color: #c0c0c0; +} + +#content #dataimport #config.debug_mode h2 a.debug_mode +{ + background-color: #ff0; + background-image: url( ../../img/ico/hammer-screwdriver.png ); + color: #333; +} + +#content #dataimport #config .content +{ + padding: 5px 2px; +} + +#content #dataimport #dataimport_config .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #dataimport #dataimport_config .formatted +{ + border: 1px solid #fff; + display: block; + padding: 2px; +} + +#content #dataimport .debug_mode #dataimport_config .editable +{ + display: block; +} + +#content #dataimport #dataimport_config .editable textarea +{ + font-family: monospace; + height: 120px; + min-height: 60px; + width: 100%; +} + +#content #dataimport #debug_response em +{ + color: #c0c0c0; + font-style: normal; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/documents.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/documents.css new file mode 100644 index 0000000000..2f0ba12ed7 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/documents.css @@ -0,0 +1,179 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #documents +{ + background-image: url( ../../img/div.gif ); + background-position: 45% 0; + background-repeat: repeat-y; +} + +#content #documents #form +{ + float: left; + /*width: 21%;*/ +} + +#content #documents #form label +{ + cursor: pointer; + display: block; + margin-top: 5px; +} + +#content #documents #form input, +#content #documents #form select, +#content #documents #form textarea +{ + margin-bottom: 2px; + /*width: 100%;*/ +} + +#content #documents #form input, +#content #documents #form textarea +{ + margin-bottom: 2px; + /*width: 98%;*/ +} + +#content #documents #form #start +{ + float: left; + /*width: 45%;*/ +} + +#content #documents #form #rows +{ + float: right; + /* width: 45%;*/ +} + +#content #documents #form .checkbox input +{ + margin-bottom: 0; + width: auto; +} + +#content #documents #form fieldset, +#content #documents #form .optional.expanded +{ + border: 1px solid #fff; + border-top: 1px solid #c0c0c0; + margin-bottom: 5px; +} + +#content #documents #form fieldset.common +{ + margin-top: 10px; +} + +#content #documents #form fieldset legend, +#content #documents #form .optional.expanded legend +{ + display: block; + margin-left: 10px; + padding: 0px 5px; +} + +#content #documents #form fieldset legend label +{ + margin-top: 0; +} + +#content #documents #form fieldset .fieldset +{ + border-bottom: 1px solid #f0f0f0; + margin-bottom: 5px; + padding-bottom: 10px; +} + +#content #documents #form .optional +{ + border: 0; +} + +#content #documents #form .optional legend +{ + margin-left: 0; + padding-left: 0; +} + +#content #documents #form .optional.expanded .fieldset +{ + display: block; +} + +#content #documents #result +{ + float: right; + width: 54%; +} + +#content #documents #result #url +{ + margin-bottom: 10px; + background-image: url( ../../img/ico/ui-address-bar.png ); + background-position: 5px 50%; + border: 1px solid #f0f0f0; + box-shadow: 1px 1px 0 #f0f0f0; + -moz-box-shadow: 1px 1px 0 #f0f0f0; + -webkit-box-shadow: 1px 1px 0 #f0f0f0; + color: #c0c0c0; + display: block; + overflow: hidden; + padding: 5px; + padding-left: 26px; + white-space: nowrap; +} + +#content #documents #result #url:focus, +#content #documents #result #url:hover +{ + border-color: #c0c0c0; + box-shadow: 1px 1px 0 #d8d8d8; + -moz-box-shadow: 1px 1px 0 #d8d8d8; + -webkit-box-shadow: 1px 1px 0 #d8d8d8; + color: #333; +} + +#content #documents #result #response +{ +} + +#content #documents #result #response pre +{ + padding-left: 20px; +} + +.description{ + font-weight: bold; +} + +#document-type{ + padding-bottom: 5px; +} + +#wizard-fields div{ + padding-top: 5px; + padding-bottom: 5px; +} + +#wiz-field-data, #wiz-field-data span{ + vertical-align: top; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/files.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/files.css new file mode 100644 index 0000000000..46b3e8c301 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/files.css @@ -0,0 +1,53 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #files #tree-holder +{ + float: left; + width: 20%; +} + +#content #files #tree-holder li +{ + overflow: hidden; +} + +#content #files form .buttons button +{ + float: right; +} + +#content #files #file-content +{ + float: right; + position: relative; + width: 78%; + min-height: 100px +} + +#content #files .show #file-content +{ + display: block; +} + +#content #files #file-content .response +{ + border: 1px solid transparent; + padding: 2px; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/index.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/index.css new file mode 100644 index 0000000000..e07b8d6268 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/index.css @@ -0,0 +1,216 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #index .bar-desc +{ + color: #c0c0c0; + font-weight: normal; + margin-left: 10px; + white-space: pre; +} + +#content #index .bar-holder +{ + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + height: 35px; +} + +#content #index .bar-holder .bar +{ + height: 100%; + position: relative; +} + +#content #index .bar-holder div .val +{ + border-right: 1px solid #f00; + display: block; + padding-right: 5px; + position: absolute; + right: 0; + top: 35px; + white-space: nowrap; +} + +#content #index .bar-holder .bar-max.bar +{ + background-color: #f0f0f0; +} + +#content #index .bar-holder .bar-max.val +{ + border-color: #f0f0f0; + color: #d6d6d6; +} + +#content #index .bar-holder .bar-total.bar +{ + background-color: #c0c0c0; +} + +#content #index .bar-holder .bar-total.val +{ + border-color: #c0c0c0; + color: #c0c0c0; +} + +#content #index .bar-holder .bar-used.bar +{ + background-color: #969696; +} + +#content #index .bar-holder .bar-used.val +{ + border-color: #969696; + color: #969696; +} + +#content #index .bar-holder.bar-lvl-2 .bar-max.val { padding-top: 25px; } +#content #index .bar-holder.bar-lvl-2 .bar-total.val { padding-top: 5px; } +#content #index .bar-holder.bar-lvl-2 { margin-bottom: 45px; } + +#content #index .bar-holder.bar-lvl-3 .bar-max.val { padding-top: 45px; } +#content #index .bar-holder.bar-lvl-3 .bar-total.val { padding-top: 25px; } +#content #index .bar-holder.bar-lvl-3 .bar-used.val { padding-top: 5px; } +#content #index .bar-holder.bar-lvl-3 { margin-bottom: 65px; } + +#content #index .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #index .index-left +{ + float: left; + width: 55%; +} + +#content #index .index-right +{ + float: right; + width: 40%; +} + +#content #index .data +{ + padding-bottom: 12px; + overflow: hidden; +} + +#content #index .data:hover +{ + overflow-x: auto; +} + +#content #index .data li +{ + padding-top: 3px; + padding-bottom: 3px; +} + +#content #index .data li dt +{ + float: left; + white-space: nowrap; + width: 20%; +} + +#content #index .data li dd +{ + float: right; + text-overflow: ellipsis; + white-space: nowrap; + width: 80% +} + +#content #index .data li dd.odd +{ + color: #999; +} + +#content #index .data dt span +{ + background-position: 1px 50%; + display: block; + padding-left: 22px; +} + +#content #index #instance h2 { background-image: url( ../../img/ico/server.png ); } +#content #index #instance .start_time dt span { background-image: url( ../../img/ico/clock-select.png ); } + +#content #index #versions h2 { background-image: url( ../../img/ico/property.png ); } +#content #index #versions .solr span { background-image: url( ../../img/solr-ico.png ); } +#content #index #versions .lucene span { background-image: url( ../../img/lucene-ico.png ); } + +#content #index #jvm h2 { background-image: url( ../../img/ico/jar.png ); } +#content #index #jvm .jvm_version dt span { background-image: url( ../../img/ico/jar.png ); } +#content #index #jvm .processors dt span { background-image: url( ../../img/ico/processor.png ); } +#content #index #jvm .command_line_args dt span { background-image: url( ../../img/ico/terminal.png ); } + +#content #index #system h2 { background-image: url( ../../img/ico/system-monitor.png ); } + +#content #index #system +{ + position: relative; +} + +#content #index #system .reload +{ + background-image: url( ../../img/ico/arrow-circle.png ); + background-position: 50% 50%; + display: block; + height: 30px; + position: absolute; + right: 0; + top: 0; + width: 30px; +} + +#content #index #system .reload.loader +{ + padding-left: 0; +} + +#content #index #system .reload span +{ + display: none; +} + +#content #index #system .content p +{ + margin-top: 10px; + margin-bottom: 5px; +} + +#content #index #system .content .no-info +{ + color: #c0c0c0; + display: none; + font-style: italic; +} + +#content #index #jvm-memory h2 { background-image: url( ../../img/ico/memory.png ); } + +#content #index #jvm-memory-bar +{ + margin-top: 20px; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/logging.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/logging.css new file mode 100644 index 0000000000..af7ec4429d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/logging.css @@ -0,0 +1,376 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #logging .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #logging .block h2 +{ + background-image: url( ../../img/ico/document-text.png ); + margin-bottom: 10px; +} + +#content #logging .block h2 span span +{ + color: #c0c0c0; + font-weight: normal; + margin-left: 10px; +} + +#content #logging #viewer +{ + position: relative; +} + +#content #logging #viewer time +{ + white-space: pre; +} + +#content #logging #viewer #footer +{ + margin-top: 20px; +} + +#content #logging #viewer #state +{ + background-position: 0 50%; + float: left; + color: #c0c0c0; + padding-left: 21px; + width: 45%; +} + +#content #logging #viewer #date-format +{ + float: right; +} + +#content #logging #viewer #date-format a +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #c0c0c0; + display: block; + padding-left: 21px; +} + +#content #logging #viewer #date-format a:hover +{ + color: #008; +} + +#content #logging #viewer #date-format a.on +{ + background-image: url( ../../img/ico/ui-check-box.png ); + color: #333; +} + +#content #logging #viewer table +{ + border-collapse: collapse; + width: 100%; +} + +#content #logging #viewer th, +#content #logging #viewer td a, +#content #logging #viewer tbody .trace td +{ + padding: 3px 10px; +} + +#content #logging #viewer td +{ + vertical-align: top; +} + +#content #logging #viewer td a +{ + display: block; +} + +#content #logging #viewer thead th +{ + font-weight: bold; + text-align: left; +} + +#content #logging #viewer tbody td, +#content #logging #viewer tfoot td +{ + border-top: 1px solid #f0f0f0; +} + +#content #logging #viewer thead th.message +{ + width:100%; +} + +#content #logging #viewer tbody td.span a +{ + padding-left: 0; + padding-right: 0; +} + +#content #logging #viewer tbody span +{ + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#content #logging #viewer tbody .level-info .level span { background-color: #ebf5eb; } +#content #logging #viewer tbody .level-warning span { background-color: #FFD930; } +#content #logging #viewer tbody .level-severe span { background-color: #c43c35; color: #fff; } + +#content #logging #viewer tbody .level-debug span { background-color: #ebf5eb; } +#content #logging #viewer tbody .level-warn span { background-color: #FFD930; } +#content #logging #viewer tbody .level-error span { background-color: #FF6130; } +#content #logging #viewer tbody .level-fatal span { background-color: #c43c35; } + +#content #logging #viewer tbody .has-trace a +{ + cursor: pointer; +} + +#content #logging #viewer tbody .has-trace a:hover +{ + color: #008; +} + +#content #logging #viewer tbody .has-trace .message a +{ + background-image: url( ../../img/ico/information.png ); + background-position: 100% 50%; + display: block; + padding-right: 21px; +} + +#content #logging #viewer tbody .has-trace.open .message a +{ + background-image: url( ../../img/ico/information-white.png ); +} + +#content #logging #viewer tbody .trace td +{ + border-top: 0; + color: #c0c0c0; +} + +#content #logging #viewer .has-data tfoot +{ + display: none; +} + +#content #logging #viewer tfoot td +{ + color: #c0c0c0; +} + +#content #logging .jstree > li +{ + margin-left: 0; +} + +#content #logging .jstree li +{ + position: relative; +} + +#content #logging .jstree .level-finest { background-color: #d5e5fc; } +#content #logging .jstree .level-fine { background-color: #d5fafc; } +#content #logging .jstree .level-config { background-color: #e6fded; } +#content #logging .jstree .level-info { background-color: #fafcd7; } +#content #logging .jstree .level-warning { background-color: #fcecd5; } +#content #logging .jstree .level-severe { background-color: #fcdcda; } +#content #logging .jstree .level-off { background-color: #ffffff; } + +/* Log4j */ +#content #logging .jstree .level-all { background-color: #9EDAFF; } +#content #logging .jstree .level-trace { background-color: #d5e5fc; } +#content #logging .jstree .level-debug { background-color: #d5fafc; } +#content #logging .jstree .level-warn { background-color: #e6fded; } +#content #logging .jstree .level-error { background-color: #fcecd5; } +#content #logging .jstree .level-fatal { background-color: #fcdcda; } + + +#content #logging .jstree a +{ + height: 17px; + line-height: 17px; + padding: 0; + width: 90%; +} + +#content #logging .jstree a:hover +{ + color: #008; +} + +#content #logging .jstree a span.ns +{ + display: none; +} + +#content #logging.ns .jstree a span.ns +{ + display: inline; +} + +#content #logging .jstree a span.name +{ + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; +} + +#content #logging .jstree a span.name em +{ + color: #f00; + font-style: normal; + text-transform: uppercase; +} + +#content #logging .jstree a.trigger.set +{ + font-weight: bold; +} + +#content #logging .jstree a:hover span.name +{ + background-image: url( ../../img/ico/pencil-small.png ); +} + +#content #logging .jstree .selector-holder +{ + position: absolute; + top: -2px; + z-index: 700; +} + +#content #logging .jstree .selector-holder.open +{ + background-color: #fff; + margin-left: -19px; + z-index: 800; +} + +#content #logging .jstree li .selector-holder { left: 440px; } +#content #logging .jstree li li .selector-holder { left: 422px; } +#content #logging .jstree li li li .selector-holder { left: 404px; } +#content #logging .jstree li li li li .selector-holder { left: 386px; } +#content #logging .jstree li li li li li .selector-holder { left: 368px; } +#content #logging .jstree li li li li li li .selector-holder { left: 350px; } +#content #logging .jstree li li li li li li li .selector-holder { left: 332px; } +#content #logging .jstree li li li li li li li li .selector-holder { left: 314px; } + +#content #logging .jstree .selector +{ + border: 1px solid transparent; + position: relative; +} + +#content #logging .jstree .open .selector +{ + border-color: #f0f0f0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; +} + +#content #logging .jstree .selector a +{ + display: block; + padding: 2px; + width: auto; +} + +#content #logging .jstree .open .selector .close +{ + background-image: url( ../../img/ico/cross-0.png ); + background-position: 50% 50%; + display: block; + position: absolute; + right: -25px; + top: 0; + width: 20px; +} + +#content #logging .jstree .open .selector .close:hover +{ + background-image: url( ../../img/ico/cross-1.png ); +} + +#content #logging .jstree .open .selector .close span +{ + display: none; +} + +#content #logging .jstree .open .selector a.trigger +{ + display: none; +} + +#content #logging .jstree .open .selector ul +{ + display: block; +} + +#content #logging .jstree .selector ul li +{ + background: none; + margin-left: 0; +} + +#content #logging .jstree .selector ul li a +{ + background-image: url( ../../img/ico/ui-radio-button-uncheck.png ); + background-position: 2px 50%; + padding-left: 21px; +} + +#content #logging .jstree .selector ul li a.level +{ + background-color: #f0f0f0; +} + +#content #logging .jstree .selector ul li a:hover +{ + background-image: url( ../../img/ico/ui-radio-button.png ); +} + +#content #logging .jstree .selector li.unset +{ + border-top: 1px solid #f0f0f0; +} + +#content #logging .jstree .selector li.unset a +{ + background-image: url( ../../img/ico/cross-0.png ); + background-position: 4px 50%; +} + +#content #logging .jstree .selector li.unset a:hover +{ + background-image: url( ../../img/ico/cross-1.png ); + color: #800; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/menu.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/menu.css new file mode 100644 index 0000000000..0e73a59a8c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/menu.css @@ -0,0 +1,328 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#menu-wrapper +{ + position: fixed; + top: 120px; + width: 150px; +} + +.scroll #menu-wrapper +{ + position: absolute; + top: 90px; +} + +.has-environment #menu-wrapper +{ + top: 160px; +} + +#menu-wrapper a +{ + display: block; + padding: 4px 2px; + overflow: hidden; + text-overflow: ellipsis; +} + +#core-selector,#collection-selector +{ + margin-top: 20px; + padding-right: 10px; +} + +#core-selector a, +#collection-selector a +{ + padding: 0; + padding-left: 8px; +} + +#core-selector select, +#collection-selector select +{ + width: 100%; +} + +#core-selector #has-no-cores a, +#collection-selector #has-no-collections a +{ + background-image: url( ../../img/ico/database--plus.png ); +} + +#core-selector #has-no-cores span, +#collection-selector #has-no-collections span +{ + color: #c0c0c0; + display: block; +} + +#menu-wrapper .active p +{ + background-color: #fafafa; + border-color: #c0c0c0; +} + +#menu-wrapper p a, +#menu a +{ + background-position: 5px 50%; + padding-left: 26px; + padding-top: 5px; + padding-bottom: 5px; +} + +#menu-wrapper p a:hover +{ + background-color: #f0f0f0; +} + +#menu-wrapper .active p a +{ + background-color: #c0c0c0; + font-weight: bold; +} + +#menu p.loader +{ + background-position: 5px 50%; + color: #c0c0c0; + margin-top: 5px; + padding-left: 26px; +} + +#menu p a small +{ + color: #b5b5b5; + font-weight: normal; +} + +#menu p a small span.txt +{ +} + +#menu p a small:hover span.txt +{ + display: inline; +} + +#menu .busy +{ + border-right-color: #f6f5d9; +} + +#menu .busy p a +{ + background-color: #f6f5d9; + background-image: url( ../../img/ico/status-away.png ); +} + +#menu .offline +{ + border-right-color: #eccfcf; +} + +#menu .offline p a +{ + background-color: #eccfcf; + background-image: url( ../../img/ico/status-busy.png ); +} + +#menu .online +{ + border-right-color: #cfecd3; +} + +#menu .online p a +{ + background-color: #cfecd3; + background-image: url( ../../img/ico/status.png ); +} + +#menu .ping small +{ + color: #000 +} + +#menu li +{ + border-bottom: 1px solid #f0f0f0; +} + +#menu li:last-child +{ + border-bottom: 0; +} + +#menu li.optional +{ +} + +.sub-menu p +{ + border-top: 1px solid #f0f0f0; +} + +.sub-menu li:first-child p +{ + border-top: 0; +} + +.sub-menu p a +{ + background-image: url( ../../img/ico/status-offline.png ); +} + +.sub-menu .active p a +{ + background-image: url( ../../img/ico/box.png ); +} + +.sub-menu ul, +#menu ul +{ + padding-top: 5px; + padding-bottom: 10px; +} + +.sub-menu .active ul, +#menu .active ul +{ + display: block; +} + +#menu ul li +{ + border-bottom: 0; +} + +#core-menu ul li a, +#collection-menu ul li a, +#menu ul li a +{ + background-position: 7px 50%; + border-bottom: 1px solid #f0f0f0; + color: #bbb; + margin-left: 15px; + padding-left: 26px; +} + +.sub-menu ul li:last-child a, +#menu ul li:last-child a +{ + border-bottom: 0; +} + +.sub-menu ul li a:hover, +#menu ul li a:hover +{ + background-color: #f0f0f0; + color: #333; +} + +.sub-menu ul li.active a, +#menu ul li.active a +{ + background-color: #d0d0d0; + border-color: #d0d0d0; + color: #333; +} + +#menu #index.global p a { background-image: url( ../../img/ico/dashboard.png ); } + +#menu #logging.global p a { background-image: url( ../../img/ico/inbox-document-text.png ); } +#menu #logging.global .level a { background-image: url( ../../img/ico/gear.png ); } + +#menu #java-properties.global p a { background-image: url( ../../img/ico/jar.png ); } + +#menu #threads.global p a { background-image: url( ../../img/ico/ui-accordion.png ); } + +#menu #collections.global p a { background-image: url( ../../img/ico/documents-stack.png ); } +#menu #cores.global p a { background-image: url( ../../img/ico/databases.png ); } + +#menu #cloud.global p a { background-image: url( ../../img/ico/network-cloud.png ); } +#menu #cloud.global .tree a { background-image: url( ../../img/ico/folder-tree.png ); } +#menu #cloud.global .graph a { background-image: url( ../../img/ico/molecule.png ); } +#menu #cloud.global .rgraph a { background-image: url( ../../img/ico/asterisk.png ); } +#menu #cloud.global .dump a { background-image: url( ../../img/ico/download-cloud.png ); } + +.sub-menu .ping.error a +{ + + background-color: #ffcccc; + background-image: url( ../../img/ico/system-monitor--exclamation.png ); + border-color: #ffcccc; + cursor: help; +} + +.sub-menu .overview a { background-image: url( ../../img/ico/home.png ); } +.sub-menu .query a { background-image: url( ../../img/ico/magnifier.png ); } +.sub-menu .stream a { background-image: url( ../../img/ico/node.png ); } +.sub-menu .analysis a { background-image: url( ../../img/ico/funnel.png ); } +.sub-menu .documents a { background-image: url( ../../img/ico/documents-stack.png ); } +.sub-menu .files a { background-image: url( ../../img/ico/folder.png ); } +.sub-menu .schema a { background-image: url( ../../img/ico/book-open-text.png ); } +.sub-menu .replication a { background-image: url( ../../img/ico/node.png ); } +.sub-menu .distribution a { background-image: url( ../../img/ico/node-select.png ); } +.sub-menu .ping a { background-image: url( ../../img/ico/system-monitor.png ); } +.sub-menu .logging a { background-image: url( ../../img/ico/inbox-document-text.png ); } +.sub-menu .plugins a { background-image: url( ../../img/ico/block.png ); } +.sub-menu .dataimport a { background-image: url( ../../img/ico/document-import.png ); } +.sub-menu .segments a { background-image: url( ../../img/ico/construction.png ); } + + +#content #navigation +{ + border-right: 1px solid #e0e0e0; +} + +#content #navigation a +{ + display: block; + padding: 4px 2px; +} + +#content #navigation .current +{ + border-color: #e0e0e0; +} + +#content #navigation a +{ + background-position: 5px 50%; + padding-left: 26px; + padding-top: 5px; + padding-bottom: 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#content #navigation a:hover +{ + background-color: #f0f0f0; +} + +#content #navigation .current a +{ + background-color: #e0e0e0; + font-weight: bold; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/plugins.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/plugins.css new file mode 100644 index 0000000000..0310e0e5d5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/plugins.css @@ -0,0 +1,212 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #plugins #navigation +{ + width: 20%; +} + +#content #plugins #navigation .cache a { background-image: url( ../../img/ico/disk-black.png ); } +#content #plugins #navigation .core a { background-image: url( ../../img/ico/wooden-box.png ); } +#content #plugins #navigation .other a { background-image: url( ../../img/ico/zone.png ); } +#content #plugins #navigation .highlighting a { background-image: url( ../../img/ico/highlighter-text.png ); } +#content #plugins #navigation .updatehandler a{ background-image: url( ../../img/ico/arrow-circle.png ); } +#content #plugins #navigation .queryhandler a { background-image: url( ../../img/ico/magnifier.png ); } +#content #plugins #navigation .queryparser a { background-image: url( ../../img/ico/asterisk.png ); } + +#content #plugins #navigation .PLUGINCHANGES { margin-top: 20px; } +#content #plugins #navigation .PLUGINCHANGES a { background-image: url( ../../img/ico/eye.png ); } +#content #plugins #navigation .RELOAD a { background-image: url( ../../img/ico/arrow-circle.png ); } + + +#content #plugins #navigation a +{ + position: relative; +} + +#content #plugins #navigation a span +{ + background-color: #bba500; + border-radius: 5px; + color: #fff; + font-size: 10px; + font-weight: normal; + line-height: 1.4em; + padding-left: 4px; + padding-right: 4px; + position: absolute; + right: 5px; + top: 7px; +} + +#content #plugins #frame +{ + float: right; + width: 78%; +} + +#content #plugins #frame .entry +{ + margin-bottom: 10px; +} + +#content #plugins #frame .entry:last-child +{ + margin-bottom: 0; +} + +#content #plugins #frame .entry a +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 0 50%; + display: block; + font-weight: bold; + padding-left: 21px; +} + +#content #plugins #frame .entry.changed a span +{ + color: #bba500; +} + +#content #plugins #frame .entry.expanded a +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #plugins #frame .entry.expanded ul +{ + display: block; +} + +#content #plugins #frame .entry ul +{ + border-left: 9px solid #f0f3ff; + margin-left: 3px; + padding-top: 5px; + padding-left: 10px; +} + +#content #plugins #frame .entry li +{ + padding-top: 2px; + padding-bottom: 2px; +} + +#content #plugins #frame .entry li.stats +{ + border-top: 1px solid #c0c0c0; + margin-top: 5px; + padding-top: 5px; +} + +#content #plugins #frame .entry li.odd +{ + background-color: #f8f8f8; +} + +#content #plugins #frame .entry dt, +#content #plugins #frame .entry .stats span +{ + float: left; + width: 11%; +} + +#content #plugins #frame .entry dd, +#content #plugins #frame .entry .stats ul +{ + float: right; + width: 88%; +} + +#content #plugins #frame .entry .stats ul +{ + border-left: 0; + margin: 0; + padding: 0; +} + +#content #plugins #frame .entry .stats dt +{ + width: 27%; +} + +#content #plugins #frame .entry .stats dd +{ + width: 72%; +} + +#content #plugins #frame .entry.expanded a.linker { + background-image: none; + background-position: 0 0; + display: inline; + font-weight: normal; + padding:0px; +} + +#content #plugins #frame .entry.expanded a.linker:hover { + background-color:#F0F3FF; +} + +#recording #blockUI +{ + position: absolute; + left:0; + top:0; + width: 100%; + height: 100%; + background-color: #000; + opacity: 0.6; + z-index:1000; + padding:0; +} + +#recording .wrapper +{ + position: absolute; + top: 50%; + left: 50%; + padding: 30px; + width: 415px; + height: 100px; + border: 2px solid black; + background-color: #FFF; + opacity: 1; + z-index: 2000; + transform: translate(-50%, -50%); +} + +#recording p +{ + background-position: 0 50%; + float: left; + padding-left: 21px; + padding-top: 7px; + padding-bottom: 7px; +} + +#recording button +{ + float: right; +} + +#recording button span +{ + background-image: url( ../../img/ico/new-text.png ); +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/query.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/query.css new file mode 100644 index 0000000000..be264bf9bf --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/query.css @@ -0,0 +1,162 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #query +{ + background-image: url( ../../img/div.gif ); + background-position: 22% 0; + background-repeat: repeat-y; +} + +#content #query #form +{ + float: left; + width: 21%; +} + +#content #query #form label +{ + cursor: pointer; + display: block; + margin-top: 5px; +} + +#content #query #form input, +#content #query #form select, +#content #query #form textarea +{ + margin-bottom: 2px; + width: 100%; +} + +#content #query #form input, +#content #query #form textarea +{ + width: 98%; +} + +#content #query #form .multiple input +{ + float: left; + width: 80% +} + +#content #query #form .multiple .buttons +{ + float: right; + width: 16%; +} + + +#content #query #form .multiple a +{ + background-position: 50% 50%; + display: block; + height: 25px; + width: 49%; +} + +#content #query #form .multiple a.add +{ + background-image: url( ../../img/ico/plus-button.png ); + float: right; +} + +#content #query #form .multiple a.rem +{ + background-image: url( ../../img/ico/minus-button.png ); + float: left; +} + +#content #query #form #start +{ + float: left; + width: 45%; +} + +#content #query #form #rows +{ + float: right; + width: 45%; +} + +#content #query #form .checkbox input +{ + margin-bottom: 0; + width: auto; +} + +#content #query #form fieldset, +#content #query #form .optional.expanded +{ + border: 1px solid #fff; + border-top: 1px solid #c0c0c0; + margin-bottom: 5px; +} + +#content #query #form fieldset.common +{ + margin-top: 10px; +} + +#content #query #form fieldset legend, +#content #query #form .optional.expanded legend +{ + display: block; + margin-left: 10px; + padding: 0px 5px; +} + +#content #query #form fieldset legend label +{ + margin-top: 0; +} + +#content #query #form fieldset .fieldset +{ + border-bottom: 1px solid #f0f0f0; + margin-bottom: 5px; + padding-bottom: 10px; +} + +#content #query #form .optional +{ + border: 0; +} + +#content #query #form .optional legend +{ + margin-left: 0; + padding-left: 0; +} + +#content #query #form .optional.expanded .fieldset +{ + display: block; +} + +#content #query #result +{ + float: right; + width: 77%; +} + +#content #query #result #response +{ +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/replication.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/replication.css new file mode 100644 index 0000000000..a8b1f8802d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/replication.css @@ -0,0 +1,500 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #replication +{ + background-image: url( ../../img/div.gif ); + background-position: 21% 0; + background-repeat: repeat-y; +} + +#content #replication #frame +{ + float: right; + width: 78%; +} + +#content #replication #navigation +{ + border-right: 0; + float: left; + width: 20%; +} + +#content #replication #error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #replication .block +{ + border-bottom: 1px solid #c0c0c0; + margin-bottom: 20px; + padding-bottom: 20px; +} + +#content #replication .block.last +{ + border-bottom: 0; +} + +#content #replication .masterOnly, +#content #replication .slaveOnly +{ +} + +#content #replication.master .masterOnly +{ + display: block; +} + +#content #replication.slave .slaveOnly +{ + display: block; +} + +#content #replication .replicating +{ +} + +#content #replication.replicating .replicating +{ + display: block; +} + +#content #replication #progress +{ + padding-bottom: 80px; + position: relative; +} + +#content #replication #progress .info +{ + padding: 5px; +} + +#content #replication #progress #start +{ + margin-left: 100px; + border-left: 1px solid #c0c0c0; +} + +#content #replication #progress #bar +{ + background-color: #f0f0f0; + margin-left: 100px; + margin-right: 100px; + position: relative; +} + +#content #replication #progress #bar #bar-info, +#content #replication #progress #bar #eta +{ + position: absolute; + right: -100px; + width: 100px; +} + +#content #replication #progress #bar #bar-info +{ + border-left: 1px solid #f0f0f0; + margin-top: 30px; +} + +#content #replication #progress #eta .info +{ + color: #c0c0c0; + height: 30px; + line-height: 30px; + padding-top: 0; + padding-bottom: 0; +} + +#content #replication #progress #speed +{ + color: #c0c0c0; + position: absolute; + right: 100px; + top: 0; +} + +#content #replication #progress #bar #done +{ + background-color: #c0c0c0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + height: 30px; + position: relative; +} + +#content #replication #progress #bar #done .percent +{ + font-weight: bold; + height: 30px; + line-height: 30px; + padding-left: 5px; + padding-right: 5px; + position: absolute; + right: 0; + text-align: right; +} + +#content #replication #progress #bar #done #done-info +{ + border-right: 1px solid #c0c0c0; + position: absolute; + right: 0; + margin-top: 30px; + text-align: right; + width: 100px; +} + +#content #replication #progress #bar #done #done-info .percent +{ + font-weight: bold; +} + +#content #replication .block .label, +#content #replication #current-file .file, +#content #replication #current-file .progress, +#content #replication #iterations .iterations +{ + float: left; +} + +#content #replication .block .label +{ + width: 100px; +} + +#content #replication .block .label span +{ + display: block; + padding-left: 21px; +} + +#content #replication #current-file +{ + border-top: 1px solid #f0f0f0; + margin-top: 10px; + padding-top: 10px; +} + +#content #replication #current-file .progress +{ + color: #c0c0c0; + margin-left: 20px; +} + +#content #replication #iterations .label span +{ + background-image: url( ../../img/ico/node-design.png ); +} + +#content #replication #iterations .iterations li +{ + background-position: 100% 50%; + padding-right: 21px; +} + +#content #replication #iterations .iterations.expanded li +{ + display: block; +} + +#content #replication #iterations .iterations .latest +{ + display: block; +} + +#content #replication #iterations .iterations .replicated +{ + color: #80c480; +} + +#content #replication #iterations .iterations ul:hover .replicated, +#content #replication #iterations .iterations .replicated.latest +{ + color: #080; +} + +#content #replication #iterations .iterations .replicated.latest +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication #iterations .iterations .failed +{ + color: #c48080; +} + +#content #replication #iterations .iterations ul:hover .failed, +#content #replication #iterations .iterations .failed.latest +{ + color: #800; +} + +#content #replication #iterations .iterations .failed.latest +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #replication #iterations .iterations a +{ + border-top: 1px solid #f0f0f0; + margin-top: 2px; + padding-top: 2px; +} + +#content #replication #iterations .iterations a span +{ + background-position: 0 50%; + color: #c0c0c0; + padding-left: 21px; +} + +#content #replication #iterations .iterations a span.expand +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + display: block; +} + +#content #replication #iterations .iterations a span.collapse +{ + background-image: url( ../../img/ico/chevron-small.png ); + display: block; +} + +#content #replication #details table +{ + margin-left: 20px; + border-collapse: collapse; +} + +#content #replication #details table th +{ + text-align: left; +} + +#content #replication.slave #details table .slaveOnly +{ + display: table-row; +} + +#content #replication #details table thead th +{ + color: #c0c0c0; +} + +#content #replication #details table thead th, +#content #replication #details table tbody td +{ + padding-right: 20px; +} + +#content #replication #details table thead td, +#content #replication #details table thead th, +#content #replication #details table tbody th, +#content #replication #details table tbody td div +{ + padding-top: 3px; + padding-bottom: 3px; +} + +#content #replication #details table tbody td, +#content #replication #details table tbody th +{ + border-top: 1px solid #f0f0f0; +} + +#content #replication #details table thead td +{ + width: 100px; +} + +#content #replication #details table thead td span +{ + background-image: url( ../../img/ico/clipboard-list.png ); + background-position: 0 50%; + display: block; + padding-left: 21px; +} + +#content #replication #details table tbody th +{ + padding-right: 10px; + text-align: right; + white-space: nowrap; +} + +#content #replication #details table tbody .size +{ + text-align: right; + white-space: nowrap; +} + +#content #replication #details table tbody .generation div +{ + text-align: center; +} + +#content #replication #details table tbody .diff div +{ + background-color: #fcfcc9; + padding-left: 1px; + padding-right: 1px; +} + +#content #replication .settings .label span +{ + background-image: url( ../../img/ico/hammer-screwdriver.png ); +} + +#content #replication .settings ul, +#content #replication .settings dl dt, +#content #replication .settings dl dd +{ + float: left; +} + +#content #replication .settings ul li +{ + border-top: 1px solid #f0f0f0; + padding-top: 3px; + padding-top: 3px; +} + +#content #replication .settings ul li:first-child +{ + border-top: 0; + padding-top: 0; +} + +#content #replication .settings dl dt +{ + clear: left; + margin-right: 5px; + width: 120px; +} + +#content #replication .settings dl .ico +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #replication .settings dl .ico.ico-0 +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #replication .settings dl .ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication .timer +{ + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + margin-bottom: 20px; + padding: 10px; +} + +#content #replication .timer p, +#content #replication .timer small +{ + padding-left: 21px; +} + +#content #replication .timer p +{ + background-image: url( ../../img/ico/clock-select-remain.png ); + background-position: 0 50%; +} + +#content #replication .timer p .approx +{ + color: #c0c0c0; + margin-right: 1px; +} + +#content #replication .timer p .tick +{ + font-weight: bold; +} + +#content #replication .timer small +{ + color: #c0c0c0; +} + +#content #replication #navigation button +{ + display: block; + margin-bottom: 10px; +} + +#content #replication #navigation button.optional +{ +} + +#content #replication #navigation .replicate-now span +{ + background-image: url( ../../img/ico/document-convert.png ); +} + +#content #replication #navigation .abort-replication span +{ + background-image: url( ../../img/ico/hand.png ); +} + +#content #replication #navigation .disable-polling span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #replication #navigation .enable-polling span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication #navigation .disable-replication span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #replication #navigation .enable-replication span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication #navigation .refresh-status span +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/schema.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/schema.css new file mode 100644 index 0000000000..626cdc2bb7 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/schema.css @@ -0,0 +1,704 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #schema .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #schema.loaded +{ + background-image: url( ../../img/div.gif ); + background-position: 21% 0; + background-repeat: repeat-y; +} + +#content #schema #data +{ + float: right; + width: 78%; +} + +#content #schema #related +{ + float: left; + width: 20%; +} + +#content #schema #related select +{ + width: 100%; +} + +#content #schema #related select optgroup +{ + font-style: normal; + padding: 5px; +} + +#content #schema #related select option +{ + padding-left: 10px; +} + +#content #schema #related #f-df-t +{ + border-bottom: 1px solid #f0f0f0; + padding-bottom: 15px; +} + +#content #schema #related .ukf-dsf dt +{ +} + +#content #schema #related dl +{ + margin-top: 15px; +} + +#content #schema #related dl dt, +#content #schema #related dl dd a +{ + color: #c0c0c0; +} + +#content #schema #related dl dt +{ + font-weight: bold; + margin-top: 5px; +} + +#content #schema #related dl dd a +{ + display: block; + padding-left: 10px; +} + +#content #schema #related dl dd a:hover +{ + background-color: #f8f8f8; +} + +#content #schema #related .field .field, +#content #schema #related .field .field a, +#content #schema #related .dynamic-field .dynamic-field, +#content #schema #related .dynamic-field .dynamic-field a, +#content #schema #related .type .type, +#content #schema #related .type .type a, +#content #schema #related .active, +#content #schema #related .active a +{ + color: #333; +} + +#content #schema #related .copyfield, +#content #schema #related .copyfield a +{ + color: #666; +} + +#content #schema #data +{ +} + +#content #schema #data #index dt +{ + float: left; + margin-right: 5px; + width: 150px; +} + +#content #schema #data #field .field-options +{ + margin-bottom: 10px; +} + +#content #schema #data #field .field-options .head h2 +{ + padding-left: 5px; +} + +#content #schema #data #field .partial +{ +} + +#content #schema #data #field .partial p +{ + background-image: url( ../../img/ico/exclamation-button.png ); + background-position: 0 50%; + padding-left: 21px; +} + +#content #schema #data #field .field-options .options dt, +#content #schema #data #field .field-options .options dd +{ + float: left; +} + +#content #schema #data #field .field-options .options dt +{ + clear: left; + margin-right: 5px; + width: 100px; +} + +#content #schema #data #field .field-options .flags +{ + margin-top: 10px; + margin-bottom: 20px; +} + +#content #schema #data #field .field-options .flags thead td +{ + color: #c0c0c0; + padding-right: 5px; + width: 100px; +} + +#content #schema #data #field .field-options .flags tbody td, +#content #schema #data #field .field-options .flags th +{ + padding: 2px 5px; +} + +#content #schema #data #field .field-options .flags thead td, +#content #schema #data #field .field-options .flags tbody th +{ + padding-left: 0; +} + +#content #schema #data #field .field-options .flags thead th, +#content #schema #data #field .field-options .flags tbody td +{ + border-left: 1px solid #f0f0f0; +} + +#content #schema #data #field .field-options .flags tbody th, +#content #schema #data #field .field-options .flags tbody td +{ + border-top: 1px solid #f0f0f0; +} + +#content #schema #data #field .field-options .flags tbody .check +{ + background-color: #fafdfa; + background-image: url( ../../img/ico/tick.png ); + background-position: 50% 50%; + text-align: center; +} + +#content #schema #data #field .field-options .flags tbody .check span +{ +} + +#content #schema #data #field .field-options .flags tbody .text +{ + color: #c0c0c0; +} + +#content #schema #data #field .field-options .analyzer, +#content #schema #data #field .field-options .analyzer li, +#content #schema #data #field .field-options .analyzer ul, +#content #schema #data #field .field-options .analyzer ul li +{ +} + +#content #schema #data #field .field-options .analyzer p, +#content #schema #data #field .field-options .analyzer dl +{ + float: left; +} + +#content #schema #data #field .field-options .analyzer p +{ + margin-right: 5px; + text-align: right; + width: 125px; + white-space: pre; +} + +#content #schema #data #field .field-options .analyzer p a +{ + cursor: auto; +} + +#content #schema #data #field .field-options .analyzer p a.analysis +{ + cursor: pointer; + display: block; +} + +#content #schema #data #field .field-options .analyzer p a.analysis span +{ + background-image: url( ../../img/ico/question-white.png ); + background-position: 0 50%; + padding-left: 21px; +} + +#content #schema #data #field .field-options .analyzer p a.analysis:hover span +{ + background-image: url( ../../img/ico/question.png ); + color: #008; +} + +#content #schema #data #field .field-options .analyzer a +{ + cursor: auto; +} + +#content #schema #data #field .field-options .analyzer .toggle +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + cursor: pointer; + display: block; + padding-right: 21px; +} + +#content #schema #data #field .field-options .analyzer .open .toggle +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #schema #data #field .field-options .analyzer li +{ + border-top: 1px solid #f0f0f0; + margin-top: 10px; + padding-top: 10px; +} + +#content #schema #data #field .field-options .analyzer ul +{ + clear: left; + margin-left: 55px; + padding-top: 5px; +} + +#content #schema #data #field .field-options .analyzer .open ul +{ + display: block; +} + +#content #schema #data #field .field-options .analyzer ul li +{ + border-top: 1px solid #f8f8f8; + margin-top: 5px; + padding-top: 5px; +} + +#content #schema #data #field .field-options .analyzer ul p +{ + color: #999; + margin-right: 5px; + text-align: right; + width: 70px; +} + +#content #schema #data #field .field-options .analyzer ul dd +{ + margin-left: 20px; +} + +#content #schema #data #field .field-options .analyzer ul dd +{ + background-image: url( ../../img/ico/document-list.png ); + background-position: 0 50%; + color: #c0c0c0; + padding-left: 21px; +} + +#content #schema #data #field .field-options .analyzer ul dd.ico-0 +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #schema #data #field .field-options .analyzer ul dd.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #schema #data #field .head +{ + margin-bottom: 5px; +} + +#content #schema #data #field .terminfo-holder +{ + border-top: 1px solid #c0c0c0; + padding-top: 10px; +} + +#content #schema #data #field .terminfo-holder .trigger +{ + float: left; + width: 140px; +} + +#content #schema #data #field .terminfo-holder .trigger button span +{ + background-image: url( ../../img/ico/information.png ); +} + +#content #schema #data #field .terminfo-holder .status +{ + border-left: 1px solid #f0f0f0; + float: left; + padding-left: 20px; + padding-right: 20px; +} + +#content #schema #data #field .terminfo-holder.disabled .trigger button span +{ + background-image: url( ../../img/ico/prohibition.png ); +} + +#content #schema #data #field .terminfo-holder.disabled .status +{ + display: block; +} + +#content #schema #data #field .terminfo-holder .trigger .autoload +{ +} + +#content #schema #data #field .terminfo-holder.loaded .trigger .autoload +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #c0c0c0; + display: block; + margin-top: 10px; + padding-left: 21px; +} + +#content #schema #data #field .terminfo-holder .trigger .autoload:hover +{ + color: #008; +} + +#content #schema #data #field .terminfo-holder .trigger .autoload.on +{ + background-image: url( ../../img/ico/ui-check-box.png ); + color: #333; +} + +#content #schema #data #field .topterms-holder, +#content #schema #data #field .histogram-holder +{ + border-left: 1px solid #f0f0f0; + float: left; + padding-left: 20px; + padding-right: 20px; +} + +#content #schema #data #field .topterms-holder .head input +{ + height: 18px; + line-height: 16px; + text-align: right; + width: 30px; +} + +#content #schema #data #field .topterms-holder .head .max-holder +{ + color: #c0c0c0; +} + +#content #schema #data #field .topterms-holder .head .max-holder:hover .max +{ + color: #008; +} + +#content #schema #data #field .topterms-holder .head #query_link +{ + background-image: url( ../../img/ico/question-white.png ); + background-position: 0 50%; + color: #c0c0c0; + padding-left: 21px; + margin-left: 5px; +} + +#content #schema #data #field .topterms-holder .head #query_link:hover +{ + background-image: url( ../../img/ico/question.png ); +} + + +#content #schema #data #field .topterms-holder .head #query_link span +{ + visibility: hidden; +} + +#content #schema #data #field .topterms-holder .head #query_link:hover span +{ + visibility: visible; +} + +#content #schema .topterms-holder li +{ + border-top: 1px solid #999; + margin-bottom: 5px; +} + +/* possible overwrite with inline style */ +#content #schema .topterms-holder li p +{ + background-color: #999; + color: #fff; + float: left; +} + +#content #schema .topterms-holder li p span +{ + display: block; + padding-right: 2px; + text-align: right; +} + +/* possible overwrite with inline style */ +#content #schema .topterms-holder li ul +{ + margin-left: 30px; +} + +#content #schema .topterms-holder li li +{ + border-top: 0; + margin-bottom: 0; + white-space: nowrap; +} + +#content #schema .topterms-holder li li.odd +{ + background-color: #f0f0f0; +} + +#content #schema .topterms-holder li li a +{ + display: block; + padding-left: 2px; + padding-right: 2px; +} + +#content #schema .topterms-holder li li a:hover +{ + background-color: #c0c0c0; +} + +#content #schema #data #field .histogram-holder ul +{ + margin-left: 25px; +} + +#content #schema #data #field .histogram-holder li +{ + margin-bottom: 2px; + position: relative; + width: 150px; +} + +#content #schema #data #field .histogram-holder li.odd +{ + background-color: #f0f0f0; +} + +#content #schema #data #field .histogram-holder li dl, +#content #schema #data #field .histogram-holder li dt +{ + padding-top: 1px; + padding-bottom: 1px; +} + +#content #schema #data #field .histogram-holder li dl +{ + background-color: #c0c0c0; + min-width: 1px; +} + +#content #schema #data #field .histogram-holder li dt +{ + color: #a0a0a0; + position: absolute; + overflow: hidden; + left: -25px; + top: 0px; +} + +#content #schema #data #field .histogram-holder li dt span +{ + display: block; + padding-right: 4px; + text-align: right; +} + +#content #schema #data #field .histogram-holder li dd +{ + clear: left; + float: left; + margin-left: 2px; + white-space: nowrap; +} + +#content #schema #data #field .histogram-holder li:hover dl +{ + background-color: #b0b0b0; +} + +#content #schema #data #field .histogram-holder li:hover dt +{ + color: #333; +} + +#content #schema #actions { + margin-bottom: 20px; + min-height: 30px; +} + +#content #schema .actions #addField span { background-image: url( ../../img/ico/document-list.png ); } +#content #schema .actions #addDynamicField span { background-image: url( ../../img/ico/documents-stack.png ); } +#content #schema .actions #addCopyField span { background-image: url( ../../img/ico/document-import.png ); } + +#content #schema .actions div.action +{ + width: 320px; + background-color: #fff; + border: 1px solid #f0f0f0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + position: absolute; + left: 160px; + top: 50px; + padding: 10px; + z-index: 2; +} + +#content #schema .actions p +{ + padding-bottom: 8px; +} + +#content #schema .actions label +{ + float: left; + padding-top: 3px; + padding-bottom: 3px; + text-align: right; + width: 25%; +} + +#content #schema .actions input, +#content #schema .actions select, +#content #schema .actions .buttons, +#content #schema .actions .note span +{ + float: right; + width: 71%; +} + +#content #schema .actions label.checkbox { + margin-left: 27%; + text-align: left; + width: 73%; + padding: 0px; + margin-top: 0px; +} +#content #schema .actions .checkbox input { + float: none; + width: auto; +} + +#content #schema .add_showhide { + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; +} + +#content #schema .add_showhide.open { + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #schema label +{ + cursor: pointer; + display: block; + margin-top: 5px; + width: 100%; +} + +#content #schema .checkbox +{ + margin-bottom: 0; + width: auto; +} + +#content #schema .chosen-container { + margin-left: 6px; + width: 100%; +} +#content #schema .chosen-drop input, +#content #schema .chosen-results { + width: 100% !important; +} + +#content #schema button span +{ + background-image: url( ../../img/ico/cross.png ); +} +#content #schema button.submit span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #schema .error +{ + background-image: url( ../../img/ico/cross-button.png ); + background-position: 22% 1px; + color: #c00; + font-weight: bold; + margin-bottom: 10px; +} + +#content #schema #actions .error span +{ + float: right; + width: 71%; + padding-left: 3px; + padding-right: 3px; +} + +#content #schema .delete-field button span { + background-image: url( ../../img/ico/cross.png ); +} + +#content #schema span.rem { + background-image: url( ../../img/ico/cross.png ); + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; + right:10px; + float:right; +} + +#content #schema .copyfield .updatable a { + float:left; + width:80%; +} \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/segments.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/segments.css new file mode 100644 index 0000000000..a18b53db6b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/segments.css @@ -0,0 +1,173 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #segments .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #segments .reload +{ + background-image: url( ../../img/ico/arrow-circle.png ); + background-position: 50% 50%; + display: block; + height: 30px; + position: absolute; + right: 10px; + top: 10px; + width: 30px; +} + +#content #segments .reload.loader +{ + padding-left: 0; +} + +#content #segments .reload span +{ + display: none; +} + +#content #segments #result +{ + width: 77%; +} + +#content #segments #result #response +{ + margin-left: 25px; +} + +#content #segments .segments-holder ul { + margin-left: 25px; +} +#content #segments .segments-holder li { + margin-bottom: 2px; + position: relative; + width: 100%; +} + +#content #segments .segments-holder li .tooltip { + display: none; + background: #C8C8C8; + position: absolute; + z-index: 1000; + width:220px; + height:120px; + margin-left: 100%; + opacity: .8; + padding: 5px; + border: 1px solid; + border-radius: 5px; +} + +#content #segments .segments-holder li .tooltip .label { + float: left; + width: 20%; + opacity: 1; +} + +#content #segments .segments-holder li:hover .tooltip { + display:block; +} + +#content #segments .segments-holder li dl, +#content #segments .segments-holder li dt { + padding-bottom: 1px; + padding-top: 1px; +} +#content #segments .segments-holder li dl { + min-width: 1px; +} +#content #segments .segments-holder li dt { + color: #a0a0a0; + left: -45px; + overflow: hidden; + position: absolute; + top: 0; +} +#content #segments .segments-holder li dt div { + display: block; + padding-right: 4px; + text-align: right; +} +#content #segments .segments-holder li dd { + clear: left; + float: left; + margin-left: 2px; + white-space: nowrap; + width: 100%; +} + +#content #segments .segments-holder li dd div.deleted { + background-color: #808080; + padding-left: 5px; +} + +#content #segments .segments-holder li dd div.live { + background-color: #DDDDDD; + float: left; +} + +#content #segments .segments-holder li dd div.start { + float: left; + width: 20%; +} + +#content #segments .segments-holder li dd div.end { + text-align: right; +} + +.merge-candidate { + background-color: #FFC9F9 !important; +} + +#content #segments .segments-holder li dd div.w5 { + width: 20%; + float: left; +} + +#content #segments #auto-refresh { + margin-top: 4px; + background-position: 50% 50%; + display: block; + height: 30px; + position: absolute; + right: 50px; + top: 10px; +} + +#content #segments #auto-refresh a { + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #c0c0c0; + display: block; + padding-left: 21px; +} + +#content #segments #auto-refresh a.on, +#content #segments #auto-refresh a:hover { + color: #333; +} + +#content #segments #auto-refresh a.on { + background-image: url( ../../img/ico/ui-check-box.png ); +} + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/stream.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/stream.css new file mode 100644 index 0000000000..0ebb592433 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/stream.css @@ -0,0 +1,233 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #stream +{ +} + +#content #stream #form +{ + float: top; +} + +#content #stream #form label +{ + cursor: pointer; + display: inline; + margin-top: 5px; +} + +#content #stream #form input, +#content #stream #form select, +#content #stream #form textarea +{ + margin-bottom: 2px; + width: 100%; +} + +#content #stream #form textarea +{ + height: 125px; +} + +#content #stream #form #start +{ + float: left; + width: 45%; +} + +#content #stream #form #rows +{ + float: right; + width: 45%; +} + +#content #stream #form input[type=checkbox] +{ + margin-bottom: 0; + margin-left: 5px; + margin-right: 0px; + width: 10px; + height: 10px; + display: inline; +} + +#content #stream #form fieldset +{ + border: 1px solid #fff; + border-top: 1px solid #c0c0c0; + margin-bottom: 5px; +} + +#content #stream #form fieldset.common +{ + margin-top: 10px; +} + +#content #stream #form fieldset legend +{ + display: block; + margin-left: 10px; + padding: 0px 5px; +} + +#content #stream #form fieldset legend label +{ + margin-top: 0; +} + +#content #stream #form button +{ + margin-right: 10px; +} + +#content #stream #form fieldset .fieldset +{ + border-bottom: 1px solid #f0f0f0; + margin-bottom: 5px; + padding-bottom: 10px; +} + +#content #stream #result +{ + float: bottom; +} + +#content #stream #result #response +{ +} + +/************************/ + +#content #stream #result #explanation +{ + border-top: 1px solid #f0f0f0; + border-bottom: 1px solid #f0f0f0; + border-left: 1px solid #f0f0f0; + border-right: 1px solid #f0f0f0; +} + +#content #stream #result #explanation .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #stream #result #explanation #error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 12px; + color: #fff; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #stream #result #explanation #error .msg +{ + font-style: italic; + font-weight: normal; + margin-top: 10px; +} + +#content #stream #result #explanation .content +{ + padding-left: 0; + padding-right: 0; +} + +#content #stream #result #explanation .content.show +{ + background-image: url( ../../img/div.gif ); + background-repeat: repeat-y; + background-position: 31% 0; +} + +#content #stream #result #explanation #legend +{ + border: 1px solid #f0f0f0; + padding: 10px; + /*position: absolute; + right: 0; + bottom: 0;*/ +} + +#content #stream #result #explanation #legend li +{ + padding-left: 15px; + position: relative; + -webkit-box-sizing: border-box; +} + +#content #stream #result #explanation #legend li svg +{ + position: absolute; + left: 0; + top: 2px; +} + +#content #stream #result #explanation #explanation-content +{ + min-height: 50px; + width: 100% +} + +#content #stream #result #explanation #explanation-content .node circle +{ + color: #c48f00; + stroke: #c48f00; + fill: #c48f00; +} + +#content #stream #result #explanation #explanation-content .link +{ + fill: none; + stroke: #e0e0e0; + stroke-width: 1.5px; +} + +#content #stream #result #explanation #legend .datastore circle, +#content #stream #result #explanation #explanation-content .node.datastore circle +{ + stroke: #3800c4; + fill: #3800c4; +} + +#content #stream #result #explanation #legend .stream-source circle, +#content #stream #result #explanation #explanation-content .node.stream-source circle +{ + stroke: #21a9ec; + fill: #21a9ec; +} + +#content #stream #result #explanation #legend .stream-decorator circle, +#content #stream #result #explanation #explanation-content .node.stream-decorator circle +{ + stroke: #cb21ec; + fill: #cb21ec; +} + +#content #stream #result #explanation #legend .graph-source circle, +#content #stream #result #explanation #explanation-content .node.graph-source circle +{ + stroke: #21eca9; + fill: #21eca9; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/threads.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/threads.css new file mode 100644 index 0000000000..c998733bab --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/angular/threads.css @@ -0,0 +1,161 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #threads .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #threads #thread-dump table +{ + border-collapse: collapse; + width: 100%; +} + +#content #threads #thread-dump table .spacer, +#content #threads #thread-dump tbody .state +{ + background-color: #fff; +} + +#content #threads #thread-dump table th, +#content #threads #thread-dump table td +{ + padding: 5px 3px; + vertical-align: top; +} + +#content #threads #thread-dump thead th +{ + background-color: #c8c8c8; + font-weight: bold; + text-align: left; +} + +#content #threads #thread-dump thead th.name +{ + width: 85%; +} + +#content #threads #thread-dump thead th.time +{ + text-align: right; + width: 15%; +} + +#content #threads #thread-dump tbody .odd +{ + background-color: #f0f0f0; +} + +#content #threads #thread-dump tbody .RUNNABLE a +{ + background-image: url( ../../img/ico/tick-circle.png ); +} + +#content #threads #thread-dump tbody .WAITING a, +#content #threads #thread-dump tbody .TIMED_WAITING a +{ + background-image: url( ../../img/ico/hourglass.png ); +} + +#content #threads #thread-dump tbody .WAITING.lock a, +#content #threads #thread-dump tbody .TIMED_WAITING.lock a +{ + background-image: url( ../../img/ico/hourglass--exclamation.png ); +} + +#content #threads #thread-dump tbody .name a +{ + background-position: 0 50%; + cursor: auto; + display: block; + padding-left: 21px; +} + +#content #threads #thread-dump tbody .stacktrace .name a +{ + cursor: pointer; +} + +#content #threads #thread-dump tbody .stacktrace .name a span +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + padding-right: 21px; +} + +#content #threads #thread-dump tbody .stacktrace.open .name a span +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #threads #thread-dump tbody .name p +{ + background-image: url( ../../img/ico/arrow-000-small.png ); + background-position: 0 50%; + color: #c0c0c0; + font-size: 11px; + margin-left: 21px; + padding-left: 21px; +} + +#content #threads #thread-dump tbody .name div +{ + border-top: 1px solid #c0c0c0; + margin-left: 21px; + margin-top: 5px; + padding-top: 5px; +} + +#content #threads #thread-dump tbody .open .name div +{ + display: block; +} + +#content #threads #thread-dump tbody .name ul +{ + list-style-type: disc; + margin-left: 0.7em; + padding-left: 0.7em; +} + +#content #threads #thread-dump tbody .time +{ + text-align: right; +} + +#content #threads .controls +{ + padding-top: 5px; + padding-bottom: 5px; +} + +#content #threads .controls a +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + padding-left: 21px; +} + +#content #threads.expanded .controls a +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/chosen.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/chosen.css new file mode 100644 index 0000000000..127b3c2f51 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/chosen.css @@ -0,0 +1,421 @@ +/* + +Chosen + +- by Patrick Filler for Harvest http://getharvest.com +- Copyright (c) 2011-2013 by Harvest + +Available for use under the MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +/* @group Base */ +.chzn-container { + font-size: 13px; + position: relative; + display: inline-block; + zoom: 1; + *display: inline; +} +.chzn-container .chzn-drop { + background: #fff; + border: 1px solid #aaa; + border-top: 0; + position: absolute; + top: 29px; + left: 0; + -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15); + -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15); + -o-box-shadow : 0 4px 5px rgba(0,0,0,.15); + box-shadow : 0 4px 5px rgba(0,0,0,.15); + z-index: 999; +} +/* @end */ + +/* @group Single Chosen */ +.chzn-container-single .chzn-single { + background-color: #ffffff; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 ); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); + background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-image: -ms-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-image: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + -webkit-border-radius: 5px; + -moz-border-radius : 5px; + border-radius : 5px; + -moz-background-clip : padding; + -webkit-background-clip: padding-box; + background-clip : padding-box; + border: 1px solid #aaaaaa; + -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); + -moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); + box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); + display: block; + overflow: hidden; + white-space: nowrap; + position: relative; + height: 23px; + line-height: 24px; + padding: 0 0 0 8px; + color: #444444; + text-decoration: none; +} +.chzn-container-single .chzn-default { + color: #999; +} +.chzn-container-single .chzn-single span { + margin-right: 26px; + display: block; + overflow: hidden; + white-space: nowrap; + -o-text-overflow: ellipsis; + -ms-text-overflow: ellipsis; + text-overflow: ellipsis; +} +.chzn-container-single .chzn-single abbr { + display: block; + position: absolute; + right: 26px; + top: 6px; + width: 12px; + height: 13px; + font-size: 1px; + background: url(../img/chosen-sprite.png) right top no-repeat; +} +.chzn-container-single .chzn-single abbr:hover { + background-position: right -11px; +} +.chzn-container-single .chzn-single div { + position: absolute; + right: 0; + top: 0; + display: block; + height: 100%; + width: 18px; +} +.chzn-container-single .chzn-single div b { + background: url('../img/chosen-sprite.png') no-repeat 0 0; + display: block; + width: 100%; + height: 100%; +} +.chzn-container-single .chzn-search { + padding: 3px 4px; + position: relative; + margin: 0; + white-space: nowrap; + z-index: 1010; +} +.chzn-container-single .chzn-search input { + background: #fff url('../img/chosen-sprite.png') no-repeat 100% -22px; + background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%); + margin: 1px 0; + padding: 4px 20px 4px 5px; + outline: 0; + border: 1px solid #aaa; + font-family: sans-serif; + font-size: 1em; +} +.chzn-container-single .chzn-drop { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius : 0 0 4px 4px; + border-radius : 0 0 4px 4px; + -moz-background-clip : padding; + -webkit-background-clip: padding-box; + background-clip : padding-box; +} +/* @end */ + +.chzn-container-single-nosearch .chzn-search input { + position: absolute; + left: -9000px; +} + +/* @group Multi Chosen */ +.chzn-container-multi .chzn-choices { + background-color: #fff; + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%); + border: 1px solid #aaa; + margin: 0; + padding: 0; + cursor: text; + overflow: hidden; + height: auto !important; + height: 1%; + position: relative; +} +.chzn-container-multi .chzn-choices li { + float: left; + list-style: none; +} +.chzn-container-multi .chzn-choices .search-field { + white-space: nowrap; + margin: 0; + padding: 0; +} +.chzn-container-multi .chzn-choices .search-field input { + color: #666; + background: transparent !important; + border: 0 !important; + font-family: sans-serif; + font-size: 100%; + height: 15px; + padding: 5px; + margin: 1px 0; + outline: 0; + -webkit-box-shadow: none; + -moz-box-shadow : none; + -o-box-shadow : none; + box-shadow : none; +} +.chzn-container-multi .chzn-choices .search-field .default { + color: #999; +} +.chzn-container-multi .chzn-choices .search-choice { + -webkit-border-radius: 3px; + -moz-border-radius : 3px; + border-radius : 3px; + -moz-background-clip : padding; + -webkit-background-clip: padding-box; + background-clip : padding-box; + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 ); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); + -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); + box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); + color: #333; + border: 1px solid #aaaaaa; + line-height: 13px; + padding: 3px 20px 3px 5px; + margin: 3px 0 3px 5px; + position: relative; + cursor: default; +} +.chzn-container-multi .chzn-choices .search-choice-focus { + background: #d4d4d4; +} +.chzn-container-multi .chzn-choices .search-choice .search-choice-close { + display: block; + position: absolute; + right: 3px; + top: 4px; + width: 12px; + height: 13px; + font-size: 1px; + background: url(../img/chosen-sprite.png) right top no-repeat; +} +.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover { + background-position: right -11px; +} +.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close { + background-position: right -11px; +} +/* @end */ + +/* @group Results */ +.chzn-container .chzn-results { + margin: 0 4px 4px 0; + max-height: 240px; + padding: 0 0 0 4px; + position: relative; + overflow-x: hidden; + overflow-y: auto; +} +.chzn-container-multi .chzn-results { + margin: -1px 0 0; + padding: 0; +} +.chzn-container .chzn-results li { + display: none; + line-height: 15px; + padding: 5px 6px; + margin: 0; + list-style: none; +} +.chzn-container .chzn-results .active-result { + cursor: pointer; + display: list-item; +} +.chzn-container .chzn-results .highlighted { + background-color: #3875d7; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 ); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); + background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%); + background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%); + background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%); + background-image: -ms-linear-gradient(top, #3875d7 20%, #2a62bc 90%); + background-image: linear-gradient(top, #3875d7 20%, #2a62bc 90%); + color: #fff; +} +.chzn-container .chzn-results li em { + background: #feffde; + font-style: normal; +} +.chzn-container .chzn-results .highlighted em { + background: transparent; +} +.chzn-container .chzn-results .no-results { + background: #f4f4f4; + display: list-item; +} +.chzn-container .chzn-results .group-result { + cursor: default; + color: #999; + font-weight: bold; +} +.chzn-container .chzn-results .group-option { + padding-left: 15px; +} +.chzn-container-multi .chzn-drop .result-selected { + display: none; +} +.chzn-container .chzn-results-scroll { + background: white; + margin: 0 4px; + position: absolute; + text-align: center; + width: 321px; /* This should by dynamic with js */ + z-index: 1; +} +.chzn-container .chzn-results-scroll span { + display: inline-block; + height: 17px; + text-indent: -5000px; + width: 9px; +} +.chzn-container .chzn-results-scroll-down { + bottom: 0; +} +.chzn-container .chzn-results-scroll-down span { + background: url('../img/chosen-sprite.png') no-repeat -4px -3px; +} +.chzn-container .chzn-results-scroll-up span { + background: url('../img/chosen-sprite.png') no-repeat -22px -3px; +} +/* @end */ + +/* @group Active */ +.chzn-container-active .chzn-single { + -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); + -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); + -o-box-shadow : 0 0 5px rgba(0,0,0,.3); + box-shadow : 0 0 5px rgba(0,0,0,.3); + border: 1px solid #5897fb; +} +.chzn-container-active .chzn-single-with-drop { + border: 1px solid #aaa; + -webkit-box-shadow: 0 1px 0 #fff inset; + -moz-box-shadow : 0 1px 0 #fff inset; + -o-box-shadow : 0 1px 0 #fff inset; + box-shadow : 0 1px 0 #fff inset; + background-color: #eee; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 ); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); + background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%); + background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%); + background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%); + background-image: -ms-linear-gradient(top, #eeeeee 20%, #ffffff 80%); + background-image: linear-gradient(top, #eeeeee 20%, #ffffff 80%); + -webkit-border-bottom-left-radius : 0; + -webkit-border-bottom-right-radius: 0; + -moz-border-radius-bottomleft : 0; + -moz-border-radius-bottomright: 0; + border-bottom-left-radius : 0; + border-bottom-right-radius: 0; +} +.chzn-container-active .chzn-single-with-drop div { + background: transparent; + border-left: none; +} +.chzn-container-active .chzn-single-with-drop div b { + background-position: -18px 1px; +} +.chzn-container-active .chzn-choices { + -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); + -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); + -o-box-shadow : 0 0 5px rgba(0,0,0,.3); + box-shadow : 0 0 5px rgba(0,0,0,.3); + border: 1px solid #5897fb; +} +.chzn-container-active .chzn-choices .search-field input { + color: #111 !important; +} +/* @end */ + +/* @group Disabled Support */ +.chzn-disabled { + cursor: default; + opacity:0.5 !important; +} +.chzn-disabled .chzn-single { + cursor: default; +} +.chzn-disabled .chzn-choices .search-choice .search-choice-close { + cursor: default; +} + +/* @group Right to Left */ +.chzn-rtl { text-align: right; } +.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; } +.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; } + +.chzn-rtl .chzn-single div { left: 3px; right: auto; } +.chzn-rtl .chzn-single abbr { + left: 26px; + right: auto; +} +.chzn-rtl .chzn-choices .search-field input { direction: rtl; } +.chzn-rtl .chzn-choices li { float: right; } +.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; } +.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; background-position: right top;} +.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; } +.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; } +.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; } +.chzn-rtl .chzn-search input { + background: #fff url('../img/chosen-sprite.png') no-repeat -38px -22px; + background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%); + background: url('../img/chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%); + padding: 4px 5px 4px 20px; + direction: rtl; +} +/* @end */ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/analysis.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/analysis.css new file mode 100644 index 0000000000..2273f4fee0 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/analysis.css @@ -0,0 +1,311 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #analysis-holder +{ + background-image: url( ../../img/div.gif ); + background-position: 50% 0; + background-repeat: repeat-y; +} + +#content #analysis #field-analysis +{ + margin-bottom: 0; +} + +#content #analysis #field-analysis .content +{ + padding-bottom: 0; +} + +#content #analysis .settings-holder +{ + clear: both; + padding-top: 15px; +} + +#content #analysis .settings +{ + background-color: #fff; + border-top: 1px solid #fafafa; + border-bottom: 1px solid #fafafa; + padding-top: 10px; + padding-bottom: 10px; +} + +#content #analysis .settings select.loader +{ + background-position: 3px 50%; + padding-left: 21px; +} + +#content #analysis .settings select optgroup +{ + font-style: normal; + padding: 5px; +} + +#content #analysis .settings select option +{ + padding-left: 10px; +} + +#content #analysis .settings #tor_schema +{ + background-image: url( ../../img/ico/question-white.png ); + background-position: 0 50%; + color: #c0c0c0; + margin-left: 5px; + padding-left: 21px; +} + +#content #analysis .settings #tor_schema:hover +{ + background-image: url( ../../img/ico/question.png ); +} + +#content #analysis .settings #tor_schema span +{ + display: none; +} + +#content #analysis .settings #tor_schema:hover span +{ + display: inline; +} + +#content #analysis .settings .buttons +{ + float: right; + width: 47%; +} + +#content #analysis .settings button +{ + float: right; +} + +#content #analysis .settings button span +{ + background-image: url( ../../img/ico/funnel.png ); +} + +#content #analysis .settings .verbose_output +{ + float: left; + width: auto; +} + +#content #analysis .settings .verbose_output a +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #999; + display: block; + padding-left: 21px; +} + +#content #analysis .settings .verbose_output.active a +{ + background-image: url( ../../img/ico/ui-check-box.png ); +} + +#content #analysis .index label, +#content #analysis .query label +{ + display: block; +} + +#content #analysis .index textarea, +#content #analysis .query textarea +{ + display: block; + width: 100%; +} + +#content #analysis .index +{ + float: left; + margin-right: 0.5%; + min-width: 47%; + max-width: 99%; +} + +#content #analysis .query +{ + float: right; + margin-left: 0.5%; + min-width: 47%; + max-width: 99%; +} + +#content #analysis .analysis-error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + display: none; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #analysis .analysis-error .head a +{ + color: #fff; + cursor: auto; +} + +#content #analysis #analysis-result +{ + overflow: auto; +} + +#content #analysis #analysis-result .index, +#content #analysis #analysis-result .query +{ + background-color: #fff; + padding-top: 20px; +} + +#content #analysis #analysis-result table +{ + border-collapse: collapse; +} + +#content #analysis #analysis-result td +{ + vertical-align: top; + white-space: nowrap; +} + +#content #analysis #analysis-result td.part.analyzer div, +#content #analysis #analysis-result td.part.spacer .holder, +#content #analysis #analysis-result td td td +{ + padding-top: 1px; + padding-bottom: 1px; +} + +#content #analysis #analysis-result td.legend, +#content #analysis #analysis-result td.data tr.verbose_output +{ + display: none; +} + +#content #analysis #analysis-result.verbose_output td.legend +{ + display: table-cell; +} + +#content #analysis #analysis-result.verbose_output td.data tr.verbose_output +{ + display: table-row; +} + +#content #analysis #analysis-result .match +{ + background-color: #e9eff7; + background-color: #f2f2ff; +} + +#content #analysis #analysis-result td.part +{ + padding-bottom: 10px; +} + +#content #analysis #analysis-result td.part.analyzer div +{ + border-right: 1px solid #f0f0f0; + padding-right: 10px; +} + +#content #analysis #analysis-result td.part.analyzer abbr +{ + color: #c0c0c0; +} + +#content #analysis #analysis-result td.part.legend .holder, +#content #analysis #analysis-result td.part.data .holder +{ + padding-left: 10px; + padding-right: 10px; + border-right: 1px solid #c0c0c0; +} + +#content #analysis #analysis-result td.part.legend td +{ + color: #c0c0c0; +} + +#content #analysis #analysis-result td.part.legend .holder +{ + border-right-color: #f0f0f0; +} + +#content #analysis #analysis-result td.part.data:last-child .holder +{ + padding-right: 0; + border-right: 0; +} + +#content #analysis #analysis-result td.details +{ + padding-left: 10px; + padding-right: 10px; + border-left: 1px solid #f0f0f0; + border-right: 1px solid #f0f0f0; +} + +#content #analysis #analysis-result td.details:first-child +{ + padding-left: 0; + border-left: 0; +} + +#content #analysis #analysis-result td.details:last-child +{ + padding-right: 0; + border-right: 0; +} + +#content #analysis #analysis-result td.details tr.empty td +{ + color: #f0f0f0; +} + +#content #analysis #analysis-result td.details tr.raw_bytes td +{ + letter-spacing: -1px; +} + +#content #analysis #analysis-result .part table table td +{ + border-top: 1px solid #f0f0f0; +} + +#content #analysis #analysis-result .part table table tr:first-child td +{ + border-top: 0; +} + +#content #analysis #field-analysis h2 { background-image: url( ../../img/ico/receipt.png ); } +#content #analysis .analysis-result h2 { background-image: url( ../../img/ico/receipt-invoice.png ); } diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/cloud.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/cloud.css new file mode 100644 index 0000000000..65b58157f8 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/cloud.css @@ -0,0 +1,410 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #cloud +{ + position: relative; +} + +#content #cloud #frame .content +{ + display: none; +} + +#content #cloud .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #cloud #error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 12px; + color: #fff; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #cloud #error .msg +{ + font-style: italic; + font-weight: normal; + margin-top: 10px; +} + +#content #cloud #debug +{ + background-color: #fff; + box-shadow: 0px 0px 10px #c0c0c0; + -moz-box-shadow: 0px 0px 10px #c0c0c0; + -webkit-box-shadow: 0px 0px 10px #c0c0c0; + display: none; + padding: 20px; + position: absolute; + left: 50px; + top: 10px; +} + +#content #cloud #debug ul +{ + margin-bottom: 5px; +} + +#content #cloud #debug ul a +{ + background-position: 4px 50%; + border-right: 0; + display: block; + padding: 2px 4px; + padding-left: 25px; +} + +#content #cloud #debug ul a:hover, +#content #cloud #debug ul a.hover +{ + background-color: #f0f0f0; +} + +#content #cloud #debug .clipboard +{ + float: left; + position: relative; +} + +#content #cloud #debug .clipboard a +{ + background-image: url( ../../img/ico/clipboard-paste.png ); + z-index: 98; +} + +#content #cloud #debug .clipboard a:hover, +#content #cloud #debug .clipboard a.hover, +#content #cloud #debug .clipboard.copied a +{ + background-image: url( ../../img/ico/clipboard-paste-document-text.png ); +} + +#content #cloud #debug .close +{ + float: right; +} + +#content #cloud #debug .close a +{ + background-image: url( ../../img/ico/cross-0.png ); + padding-left: 21px; +} + +#content #cloud #debug .close a:hover +{ + background-image: url( ../../img/ico/cross-1.png ); +} + +#content #cloud #debug .debug +{ + border: 1px solid #f0f0f0; + max-height: 350px; + overflow: auto; + padding: 5px; + width: 500px; +} + +#content #cloud #debug .debug .loader +{ + background-position: 5px 50%; + display: block; + padding: 10px 26px; +} + +#content #cloud .content +{ + padding-left: 0; + padding-right: 0; +} + +#content #cloud .content.show +{ + background-image: url( ../../img/div.gif ); + background-repeat: repeat-y; + background-position: 31% 0; +} + +#content #cloud #tree +{ + float: left; + width: 30%; +} + +#content #cloud .show #tree +{ + overflow: hidden; +} + +#content #cloud #file-content +{ + display: none; + float: right; + position: relative; + width: 68%; + min-height: 100px +} + +#content #cloud .show #file-content +{ + display: block; +} + +#content #cloud #file-content .close +{ + background-image: url( ../../img/ico/cross-0.png ); + background-position: 50% 50%; + display: block; + height: 20px; + position: absolute; + right: 0; + top: 0; + width: 20px; +} + +#content #cloud #file-content .close:hover +{ + background-image: url( ../../img/ico/cross-1.png ); +} + +#content #cloud #file-content .close span +{ + display: none; +} + +#content #cloud #file-content #data +{ + border-top: 1px solid #c0c0c0; + margin-top: 10px; + padding-top: 10px; +} + +#content #cloud #file-content #data pre +{ + display: block; + max-height: 600px; + overflow: auto; +} + +#content #cloud #file-content #data em +{ + color: #c0c0c0; +} + +#content #cloud #file-content #prop +{ +} + +#content #cloud #file-content li +{ + padding-top: 3px; + padding-bottom: 3px; +} + +#content #cloud #file-content li.odd +{ + background-color: #F8F8F8; +} + +#content #cloud #file-content li dt +{ + float: left; + width: 19%; +} + +#content #cloud #file-content li dd +{ + float: right; + width: 80%; +} + +/* tree */ + +#content #cloud #legend +{ + border: 1px solid #f0f0f0; + padding: 10px; + position: absolute; + right: 0; + bottom: 0; +} + +#content #cloud #legend li +{ + padding-left: 15px; + position: relative; +} + +#content #cloud #legend li svg +{ + position: absolute; + left: 0; + top: 2px; +} + +#content #graph-content +{ + min-height: 400px; +} + +#content #graph-content .node +{ + fill: #333; +} + +#content #cloud #legend circle, +#content #graph-content .node circle +{ + fill: #fff; + stroke: #c0c0c0; + stroke-width: 1.5px; +} + +#content #graph-content .node.lvl-3 text +{ + cursor: pointer; +} + +#content #graph-content .node.lvl-3:hover circle +{ + stroke: #000 !important; +} + +#content #graph-content .node.lvl-3:hover text +{ + fill: #000 !important; +} + +#content #graph-content .link +{ + fill: none; + stroke: #e0e0e0; + stroke-width: 1.5px; +} + +#content #cloud #legend .gone circle, +#content #graph-content .node.gone circle, +#content #graph-content .link.gone +{ + stroke: #f0f0f0; +} + +#content #graph-content .node.gone text +{ + fill: #f0f0f0; +} + +#content #cloud #legend ul .gone +{ + color: #e0e0e0; +} + +#content #cloud #legend .recovery_failed, +#content #cloud #legend .recovery_failed circle, +#content #graph-content .node.recovery_failed circle +{ + color: #C43C35; + stroke: #C43C35; +} + +#content #graph-content .node.recovery_failed text +{ + fill: #C43C35; +} + +#content #cloud #legend .down, +#content #cloud #legend .down circle, +#content #graph-content .node.down circle +{ + color: #c48f00; + stroke: #c48f00; +} + +#content #graph-content .node.down text +{ + fill: #c48f00; +} + +#content #cloud #legend .recovering, +#content #cloud #legend .recovering circle, +#content #graph-content .node.recovering circle +{ + color: #d5dd00; + stroke: #d5dd00; +} + +#content #graph-content .node.recovering text +{ + fill: #d5dd00; +} + +#content #cloud #legend .active, +#content #cloud #legend .active circle, +#content #graph-content .node.active circle +{ + color: #57A957; + stroke: #57A957; +} + +#content #graph-content .node.active text +{ + fill: #57A957; +} + +#content #cloud #legend .leader circle, +#content #graph-content .node.leader circle +{ + fill: #000; +} + +#content #cloud #legend .leader circle +{ + stroke: #fff; +} + +#content #graph-content .link.lvl-2, +#content #graph-content .link.leader +{ + stroke: #c0c0c0; +} + +#content #graph-content .node.lvl-0 circle +{ + stroke: #fff; +} + +#content #graph-content .link.lvl-1 +{ + stroke: #fff; +} + +#cloudGraphPaging +{ + display: inline-block, + padding-top: 15px, + padding-bottom: 15px +} \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/common.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/common.css new file mode 100644 index 0000000000..6c0a9fbcba --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/common.css @@ -0,0 +1,731 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +* +{ + background-repeat: no-repeat; + margin: 0; + padding: 0; +} + +body, h1, h2, h3, h4, h5, h6, a, button, input, select, option, textarea, th, td +{ + color: #333; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} + +body +{ + padding: 30px; + text-align: center; +} + +a, button +{ + cursor: pointer; +} + +input, select, textarea +{ + border: 1px solid #c0c0c0; + padding: 2px; +} + +input[readonly=readonly] +{ + border-color: #f0f0f0; +} + +button +{ + background-color: #e6e6e6; + background-repeat: no-repeat; + background-image: -webkit-gradient( linear, 0 0, 0 100%, from( #ffffff ), color-stop( 25%, #ffffff ), to( #e6e6e6 ) ); + background-image: -webkit-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -moz-linear-gradient( top, #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -ms-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -o-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0 ); + border: 1px solid #ccc; + border-bottom-color: #bbb; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + -moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + color: #333; + cursor: pointer; + display: inline-block; + padding: 4px 7px 5px; + overflow: visible; + text-shadow: 0 1px 1px rgba( 255, 255, 255, 0.75 ); + -webkit-transition: 0.1s linear background-image; + -moz-transition: 0.1s linear background-image; + -ms-transition: 0.1s linear background-image; + -o-transition: 0.1s linear background-image; + transition: 0.1s linear background-image; +} + +button span +{ + background-position: 0 50%; + display: block; + padding-left: 21px; +} + +button[type=submit], button.primary +{ + background-color: #0064cd; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #049cdb ), to( #0064cd ) ); + background-image: -moz-linear-gradient( top, #049cdb, #0064cd ); + background-image: -ms-linear-gradient( top, #049cdb, #0064cd ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #049cdb ), color-stop( 100%, #0064cd ) ); + background-image: -webkit-linear-gradient( top, #049cdb, #0064cd ); + background-image: -o-linear-gradient( top, #049cdb, #0064cd ); + background-image: linear-gradient( top, #049cdb, #0064cd ); + border-color: #0064cd #0064cd #003f81; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + color: #ffffff; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0 ); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +button.success +{ + background-color: #57a957; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #62c462 ), to( #57a957 ) ); + background-image: -moz-linear-gradient( top, #62c462, #57a957 ); + background-image: -ms-linear-gradient( top, #62c462, #57a957 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #62c462 ), color-stop( 100%, #57a957 ) ); + background-image: -webkit-linear-gradient( top, #62c462, #57a957 ); + background-image: -o-linear-gradient( top, #62c462, #57a957 ); + background-image: linear-gradient( top, #62c462, #57a957 ); + border-color: #57a957 #57a957 #3d773d; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#62c462', endColorstr='#57a957', GradientType=0 ); + color: #ffffff; + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} + +button.warn +{ + background-color: #c43c35; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #ee5f5b ), to( #c43c35 ) ); + background-image: -moz-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -ms-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #ee5f5b ), color-stop( 100%, #c43c35 ) ); + background-image: -webkit-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -o-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: linear-gradient( top, #ee5f5b, #c43c35 ); + border-color: #c43c35 #c43c35 #882a25; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + color: #ffffff; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0 ); + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} + +a +{ + text-decoration: none; +} + +pre +{ + color: #333; + text-align: left; +} + +abbr +{ + cursor: help; +} + +ul +{ + list-style: none; +} + +.clearfix:after { clear: both; content: "."; display: block; font-size: 0; height: 0; visibility: hidden; } +.clearfix { display: block; } + +.loader +{ + background-image: url( ../../img/loader.gif ) !important; +} + +.loader-light +{ + background-image: url( ../../img/loader-light.gif ) !important; +} + +#wrapper +{ + position: relative; + margin: 0 auto; + margin-bottom: 30px; + text-align: left; +} + +#header +{ + padding-bottom: 10px; + position: fixed; + z-index: 42; +} + +.scroll #header +{ + position: absolute; +} + +#header #solr +{ + background-image: url( ../../img/solr.svg ); + background-size: 128px; + display: block; + height: 78px; + width: 150px; +} + +#header #solr span +{ + display: none; +} + +#main +{ + min-width: 750px; + position: relative; +} + +#main.error +{ + border: 0; + min-height: 0; + padding-top: 20px; +} + +#main.error .message +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + font-weight: bold; + margin-left: 150px; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#main.error .code +{ + border: 1px solid #c0c0c0; + padding: 5px; +} + +#meta +{ + position: absolute; + bottom: -26px; + right: 0; +} + +#meta li +{ + float: left; +} + +#meta li a +{ + background-position: 10px 50%; + display: block; + height: 25px; + line-height: 25px; + padding-left: 31px; + padding-right: 10px; +} + +#meta li a:hover +{ + background-color: #f0f0f0; +} + +#meta .documentation a { background-image: url( ../../img/ico/document-text.png ); } +#meta .issues a { background-image: url( ../../img/ico/bug.png ); } +#meta .irc a { background-image: url( ../../img/ico/users.png ); } +#meta .mailinglist a { background-image: url( ../../img/ico/mail.png ); } +#meta .wiki-query-syntax a { background-image: url( ../../img/ico/script-code.png ); } + +#environment +{ + background-image: url( ../../img/ico/box.png ); + background-position: 5px 50%; + display: none; + font-weight: bold; + margin-top: 10px; + padding: 5px 10px; + padding-left: 26px; +} + +.has-environment #environment +{ + display: block; +} + +#environment.prod +{ + background-color: #c37f7f; + color: #fff; +} + +#environment.test +{ + background-color: #f5f5b2; +} + +#environment.dev +{ + background-color: #cce7cc; +} + +#init-failures +{ + border: 1px solid #f00; + display: none; + margin-left: 150px; + margin-bottom: 20px; +} + +#init-failures h2, +#init-failures ul, +#init-failures p +{ + padding: 10px; +} + +#init-failures h2 +{ + background-color: #f00; + color: #fff; + font-weight: bold; +} + +#init-failures p +{ + color: #c0c0c0; + padding-top: 0; +} + +#content-wrapper +{ + margin-left: 150px; + border: 1px solid #c0c0c0; + min-height: 500px; +} + +#content +{ + padding: 10px; +} + +#content > .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content iframe +{ + border: 0; + display: block; + min-height: 400px; + width: 100%; +} + +#content .block +{ + margin-bottom: 10px; +} + +#content .block h2 +{ + background-color: #fafafa; + background-position: 5px 50%; + border-bottom: 1px solid #f0f0f0; + font-weight: bold; + padding: 5px; + padding-left: 26px; +} + +#content .block.disabled, +#content .block.disabled h2 +{ + color: #c0c0c0; +} + +#content .block .message, +#content .block .content +{ + padding: 5px; +} + +#content .block .message +{ + display: none; +} + +/* syntax */ + +pre.syntax +{ + overflow: auto; +} + +pre.syntax code +{ + display: block; + color: #000; +} + +pre.syntax .comment, +pre.syntax .template_comment, +pre.syntax .diff .header, +pre.syntax .javadoc +{ + color: #998; + font-style: italic; +} + +pre.syntax .keyword, +pre.syntax .css .rule .keyword, +pre.syntax .winutils, +pre.syntax .javascript .title, +pre.syntax .lisp .title, +pre.syntax .subst +{ + color: #000; + font-weight: bold; +} + +pre.syntax .number, +pre.syntax .hexcolor +{ + color: #40a070; +} + +pre.syntax.language-json .number +{ + color: blue; +} + +pre.syntax.language-json .literal +{ + color: firebrick; +} + +pre.syntax .string, +pre.syntax .tag .value, +pre.syntax .phpdoc, +pre.syntax .tex .formula +{ + color: #d14; +} + +pre.syntax.language-json .string +{ + color: green; +} + +pre.syntax .title, +pre.syntax .id +{ + color: #900; + font-weight: bold; +} + +pre.syntax .javascript .title, +pre.syntax .lisp .title, +pre.syntax .subst +{ + font-weight: normal; +} + +pre.syntax .class .title, +pre.syntax .tex .command +{ + color: #458; + font-weight: bold; +} + +pre.syntax .tag, +pre.syntax .css .keyword, +pre.syntax .html .keyword, +pre.syntax .tag .title, +pre.syntax .django .tag .keyword +{ + color: #000080; + font-weight: normal; +} + +pre.syntax .attribute, +pre.syntax .variable, +pre.syntax .instancevar, +pre.syntax .lisp .body +{ + color: #008080; +} + +pre.syntax.language-json .attribute +{ + color: black; + font-weight: bold; +} + +pre.syntax .regexp +{ + color: #009926; +} + +pre.syntax .class +{ + color: #458; + font-weight: bold; +} + +pre.syntax .symbol, +pre.syntax .ruby .symbol .string, +pre.syntax .ruby .symbol .keyword, +pre.syntax .ruby .symbol .keymethods, +pre.syntax .lisp .keyword, +pre.syntax .tex .special +{ + color: #990073; +} + +pre.syntax .builtin, +pre.syntax .built_in, +pre.syntax .lisp .title +{ + color: #0086b3; +} + +pre.syntax .preprocessor, +pre.syntax .pi, +pre.syntax .doctype, +pre.syntax .shebang, +pre.syntax .cdata +{ + color: #999; + font-weight: bold; +} + +pre.syntax .deletion +{ + background: #fdd; +} + +pre.syntax .addition +{ + background: #dfd; +} + +pre.syntax .diff .change +{ + background: #0086b3; +} + +pre.syntax .chunk +{ + color: #aaa; +} + +pre.syntax .tex .formula +{ + opacity: 0.5; +} + +#content .tree li, +#content .tree ins +{ + background-color: transparent; + background-image: url( ../../img/tree.png ); + background-repeat: no-repeat; +} + +#content .tree li +{ + background-position: -54px 0; + background-repeat: repeat-y; + line-height: 22px; +} + +#content .tree li.jstree-last +{ + background:transparent; +} + +#content .tree .jstree-open > ins +{ + background-position: -36px 0; +} + +#content .tree .jstree-closed > ins +{ + background-position: -18px 0; +} + +#content .tree .jstree-leaf > ins +{ + background-position: 0 0; +} + +#content .tree .jstree-hovered +{ + background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; +} + +#content .tree .jstree-clicked +{ + background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; +} + +#content .tree a.active +{ + background-color: #f0f0f0; + color: #00f; +} + +#content .tree a .jstree-icon +{ + background-image: url( ../../img/ico/folder.png ); +} + +#content .tree .jstree-leaf a .jstree-icon +{ + background-image: url( ../../img/ico/document-text.png ); +} + +#content .tree .jstree-search +{ + font-style:italic; +} + +#content .tree a.jstree-search +{ + color:aqua; +} + +#connection_status +{ + display: none; + padding: 30px; +} + +#connection_status span +{ + background-image: url( ../../img/ico/network-status-busy.png ); + background-position: 0 50%; + color: #800; + padding-left: 26px; +} + +#connection_status.online span, +#connection_status.online span a +{ + color: #080; +} + +#connection_status.online span +{ + background-image: url( ../../img/ico/network-status.png ); +} + +#connection_status.online span a +{ + text-decoration: underline; +} + +#connection_status.online span a:hover +{ + text-decoration: none; +} + +#content .address-bar +{ + margin-bottom: 10px; + background-image: url( ../../img/ico/ui-address-bar.png ); + background-position: 5px 50%; + border: 1px solid #f0f0f0; + box-shadow: 1px 1px 0 #f0f0f0; + -moz-box-shadow: 1px 1px 0 #f0f0f0; + -webkit-box-shadow: 1px 1px 0 #f0f0f0; + color: #c0c0c0; + display: block; + overflow: hidden; + padding: 5px; + padding-left: 26px; + white-space: nowrap; +} + +#content .address-bar:focus, +#content .address-bar:hover +{ + border-color: #c0c0c0; + box-shadow: 1px 1px 0 #d8d8d8; + -moz-box-shadow: 1px 1px 0 #d8d8d8; + -webkit-box-shadow: 1px 1px 0 #d8d8d8; + color: #333; +} + +.other-ui-link { + margin: 0px; + position: absolute; + right: 0px; + top: -20px; +} + +.other-ui-link span.help { + background-image: url( ../../img/ico/information-white.png ); + right: 0px; + padding-left: 16px; +} +.other-ui-link a.ul { + text-decoration: underline; +} + +.old-ui-warning { + position: absolute; + right: 0px; + top: -20px; + align: center; + color: red; + font-weight: bold; +} +.old-ui-warning a.ul { + color: red; + font-weight: bold; + text-decoration: underline; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/cores.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/cores.css new file mode 100644 index 0000000000..6a305883fb --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/cores.css @@ -0,0 +1,244 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #cores +{ + position: relative; +} + +#content #cores #ui-block +{ + background-color: #fff; + height: 200px; + display: none; + position: absolute; + left: -5px; + top: 35px; + width: 500px; +} + +#content #cores.empty .requires-core +{ + display: none; +} + +#content #cores #frame +{ + float: right; + width: 86%; +} + +#content #cores #navigation +{ + padding-top: 50px; + width: 12%; +} + +#content #cores #navigation a +{ + padding-left: 5px; +} + +#content #cores #frame .actions +{ + margin-bottom: 20px; + min-height: 30px; +} + +#content #cores .actions div.action +{ + width: 300px; +} + +#content #cores .actions div.action .cloud +{ + display: none; +} + +#content #cores .actions form .directory-note +{ + background-image: url( ../../img/ico/information-white.png ); + background-position: 22% 1px; + color: #c0c0c0; +} + +#content #cores .actions form .error +{ + background-image: url( ../../img/ico/cross-button.png ); + background-position: 22% 1px; + color: #c00; + font-weight: bold; + display: none; +} + +#content #cores .actions form p +{ + padding-bottom: 8px; +} + +#content #cores .actions form label +{ + float: left; + padding-top: 3px; + padding-bottom: 3px; + text-align: right; + width: 25%; +} + +#content #cores .actions form input, +#content #cores .actions form select, +#content #cores .actions form .buttons, +#content #cores .actions form .note span +{ + float: right; + width: 71%; +} + +#content #cores .actions form .note span +{ + padding-left: 3px; + padding-right: 3px; +} + +#content #cores .actions form .buttons +{ + padding-top: 10px; +} + +#content #cores .actions form button.submit +{ + margin-right: 20px; +} + +#content #cores .actions form button.submit span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #cores .actions form button.reset span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #cores .actions #add +{ + left: 0; + position: absolute; +} + +#content #cores .actions #add span +{ + background-image: url( ../../img/ico/plus-button.png ); +} + +#content #cores .actions #unload +{ + margin-right: 20px; +} + +#content #cores .actions #unload span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #cores .actions #reload span +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} + +#content #cores .actions #rename span +{ + background-image: url( ../../img/ico/ui-text-field-select.png ); +} + +#content #cores .actions #swap span +{ + background-image: url( ../../img/ico/arrow-switch.png ); +} + +#content #cores .actions #optimize +{ + display: none; +} + +#content #cores .actions #optimize span +{ + background-image: url( ../../img/ico/hammer-screwdriver.png ); +} + +#content #cores .actions div.action +{ + background-color: #fff; + border: 1px solid #f0f0f0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + display: none; + position: absolute; + left: -50px; + top: 40px; + padding: 10px; +} + +#content #cores #data #core-data h2 { background-image: url( ../../img/ico/box.png ); } +#content #cores #data #index-data h2 { background-image: url( ../../img/ico/chart.png ); } + +#content #cores #data #index-data +{ + margin-top: 10px; +} + +#content #cores #data li +{ + padding-bottom: 3px; + padding-top: 3px; +} + +#content #cores #data li.odd +{ + background-color: #f8f8f8; +} + +#content #cores #data li dt +{ + float: left; + width: 17%; +} + +#content #cores #data li dd +{ + float: right; + width: 82%; +} + +#content #cores #data li dd.ico +{ + background-image: url( ../../img/ico/slash.png ); + height: 20px; +} + +#content #cores #data li dd.ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #cores #data li dd.ico span +{ + display: none; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/dashboard.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/dashboard.css new file mode 100644 index 0000000000..8d8fd97212 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/dashboard.css @@ -0,0 +1,155 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #dashboard .block +{ + background-image: none; + width: 49%; +} + +#content #dashboard .fieldlist +{ + float: left; +} + +#content #dashboard .fieldlist dt, +#content #dashboard .fieldlist dd +{ + display: block; + float: left; +} + +#content #dashboard .fieldlist dt +{ + clear: left; + margin-right: 2%; + text-align: right; + width: 23%; +} + +#content #dashboard .fieldlist dd +{ + width: 74%; +} + +#content #dashboard .fieldlist .index_optimized +{ + margin-top: 10px; +} + +#content #dashboard .fieldlist .ico +{ + background-image: url( ../../img/ico/slash.png ); + height: 20px; +} + +#content #dashboard .fieldlist .ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dashboard .fieldlist .ico span +{ + display: none; +} + +#content #dashboard #statistics .index_optimized.value a +{ + display: none; +} + +#content #dashboard #statistics .index_optimized.value.ico-0 a +{ + background-color: #f0f0f0; + background-image: url( ../../img/ico/hammer-screwdriver.png ); + background-position: 5px 50%; + border: 1px solid #c0c0c0; + display: block; + float: left; + margin-left: 50px; + padding: 1px 5px; + padding-left: 26px; +} + +#content #dashboard #statistics .index_has-deletions +{ + display: none; +} + +#content #dashboard #statistics .index_has-deletions.value.ico-0 +{ + background-image: url( ../../img/ico/tick-red.png ); +} + +#content #dashboard #replication +{ + float: left; +} + +#content #dashboard #replication .is-replicating +{ + background-position: 99% 50%; + display: block; +} + +#content #dashboard #replication #details table thead td span +{ + display: none; +} + +#content #dashboard #instance +{ + float: right; +} + +#content #dashboard #instance .dir_impl +{ + margin-top: 10px; +} + +#content #dashboard #admin-extra +{ + float: left; +} + +#content #dashboard #healthcheck +{ + float: right; +} + +#content #dashboard #healthcheck .ico +{ + background-image: url( ../../img/ico/slash.png ); + height: 20px; + padding-left: 20px; + width: 60%; +} + +#content #dashboard #healthcheck .ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dashboard #system h2 { background-image: url( ../../img/ico/server.png ); } +#content #dashboard #statistics h2 { background-image: url( ../../img/ico/chart.png ); } +#content #dashboard #replication h2 { background-image: url( ../../img/ico/node.png ); } +#content #dashboard #replication.master h2 { background-image: url( ../../img/ico/node-master.png ); } +#content #dashboard #replication.slave h2 { background-image: url( ../../img/ico/node-slave.png ); } +#content #dashboard #instance h2 { background-image: url( ../../img/ico/server.png ); } +#content #dashboard #admin-extra h2 { background-image: url( ../../img/ico/plus-button.png ); } \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/dataimport.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/dataimport.css new file mode 100644 index 0000000000..0ec196d53d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/dataimport.css @@ -0,0 +1,403 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #dataimport +{ + background-image: url( ../../img/div.gif ); + background-position: 21% 0; + background-repeat: repeat-y; +} + +#content #dataimport #frame +{ + float: right; + width: 78%; +} + +#content #dataimport #form +{ + float: left; + width: 20%; +} + +#content #dataimport #form #navigation +{ + border-right: 0; +} + +#content #dataimport #form #navigation a +{ + background-image: url( ../../img/ico/status-offline.png ); +} + +#content #dataimport #form #navigation .current a +{ + background-image: url( ../../img/ico/status.png ); +} + +#content #dataimport #form form +{ + display: none; + border-top: 1px solid #f0f0f0; + margin-top: 10px; + padding-top: 5px; +} + +#content #dataimport.error #form form +{ + display: none !important; +} + +#content #dataimport #form label +{ + cursor: pointer; + display: block; + margin-top: 5px; +} + +#content #dataimport #form input, +#content #dataimport #form select, +#content #dataimport #form textarea +{ + margin-bottom: 2px; + width: 100%; +} + +#content #dataimport #form input +{ + width: 98%; +} + +#content #dataimport #form button +{ + margin-top: 10px; +} + +#content #dataimport #form .execute span +{ + background-image: url( ../../img/ico/document-import.png ); +} + +#content #dataimport #form .refresh-status span +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} + +#content #dataimport #form .refresh-status span.success +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dataimport #form #start +{ + float: left; + width: 47%; +} + +#content #dataimport #form #rows +{ + float: right; + width: 47%; +} + +#content #dataimport #form .checkbox input +{ + margin-bottom: 0; + width: auto; +} + +#content #dataimport #form #auto-refresh-status +{ + margin-top: 20px; +} + +#content #dataimport #form #auto-refresh-status a +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #c0c0c0; + display: block; + padding-left: 21px; +} + +#content #dataimport #form #auto-refresh-status a.on, +#content #dataimport #form #auto-refresh-status a:hover +{ + color: #333; +} + +#content #dataimport #form #auto-refresh-status a.on +{ + background-image: url( ../../img/ico/ui-check-box.png ); +} + +#content #dataimport #current_state +{ + padding: 10px; + margin-bottom: 20px; +} + +#content #dataimport.error #current_state +{ + display: none !important; +} + +#content #dataimport #current_state .last_update, +#content #dataimport #current_state .info +{ + display: block; + padding-left: 21px; +} + +#content #dataimport #current_state .last_update +{ + color: #c0c0c0; + font-size: 11px; +} + +#content #dataimport #current_state .info +{ + background-position: 0 1px; + position: relative; +} + +#content #dataimport #current_state .info .details span +{ + color: #c0c0c0; +} + +#content #dataimport #current_state .info .abort-import +{ + display: none; + position: absolute; + right: 0px; + top: 0px; +} + +#content #dataimport #current_state .info .abort-import span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #dataimport #current_state .info .abort-import.success span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dataimport #current_state.indexing +{ + background-color: #f9f9f9; +} + +#content #dataimport #current_state.indexing .info +{ + background-image: url( ../../img/ico/hourglass.png ); +} + +#content #dataimport #current_state.indexing .info .abort-import +{ + display: block; +} + +#content #dataimport #current_state.success +{ + background-color: #e6f3e6; +} + +#content #dataimport #current_state.success .info +{ + background-image: url( ../../img/ico/tick-circle.png ); +} + +#content #dataimport #current_state.success .info strong +{ + color: #080; +} + +#content #dataimport #current_state.aborted +{ + background-color: #f3e6e6; +} + +#content #dataimport #current_state.aborted .info +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #dataimport #current_state.aborted .info strong +{ + color: #800; +} + +#content #dataimport #current_state.failure +{ + background-color: #f3e6e6; +} + +#content #dataimport #current_state.failure .info +{ + background-image: url( ../../img/ico/cross-button.png ); +} + +#content #dataimport #current_state.failure .info strong +{ + color: #800; +} + +#content #dataimport #current_state.idle +{ + background-color: #e6e6ff; +} + +#content #dataimport #current_state.idle .info +{ + background-image: url( ../../img/ico/information.png ); +} + +#content #dataimport #error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + display: none; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #dataimport .block h2 +{ + border-color: #c0c0c0; + padding-left: 5px; + position: relative; +} + +#content #dataimport .block.hidden h2 +{ + border-color: #fafafa; +} + +#content #dataimport .block h2 a.toggle +{ + background-image: url( ../../img/ico/toggle-small.png ); + background-position: 0 50%; + padding-left: 21px; +} + +#content #dataimport .block.hidden h2 a.toggle +{ + background-image: url( ../../img/ico/toggle-small-expand.png ); +} + +#content #dataimport #config h2 a.r +{ + background-position: 3px 50%; + display: block; + float: right; + margin-left: 10px; + padding-left: 24px; + padding-right: 3px; +} + +#content #dataimport #config h2 a.reload_config +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} + +#content #dataimport #config h2 a.reload_config.success +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #dataimport #config h2 a.reload_config.error +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #dataimport #config h2 a.debug_mode +{ + background-image: url( ../../img/ico/hammer.png ); + color: #c0c0c0; +} + +#content #dataimport #config.debug_mode h2 a.debug_mode +{ + background-color: #ff0; + background-image: url( ../../img/ico/hammer-screwdriver.png ); + color: #333; +} + +#content #dataimport .block.hidden .content +{ + display: none; +} + +#content #dataimport #config .content +{ + padding: 5px 2px; +} + +#content #dataimport #dataimport_config .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #dataimport #dataimport_config .formatted +{ + border: 1px solid #fff; + display: block; + padding: 2px; +} + +#content #dataimport .debug_mode #dataimport_config .formatted +{ + display: none; +} + +#content #dataimport #dataimport_config .editable +{ + display: none; +} + +#content #dataimport .debug_mode #dataimport_config .editable +{ + display: block; +} + +#content #dataimport #dataimport_config .editable textarea +{ + font-family: monospace; + height: 120px; + min-height: 60px; + width: 100%; +} + +#content #dataimport #debug_response +{ + display: none; +} + +#content #dataimport #debug_response em +{ + color: #c0c0c0; + font-style: normal; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/documents.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/documents.css new file mode 100644 index 0000000000..18c4efc384 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/documents.css @@ -0,0 +1,197 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #documents +{ + background-image: url( ../../img/div.gif ); + background-position: 45% 0; + background-repeat: repeat-y; +} + +#content #documents #form +{ + float: left; + /*width: 21%;*/ +} + +#content #documents #form label +{ + cursor: pointer; + display: block; + margin-top: 5px; +} + +#content #documents #form input, +#content #documents #form select, +#content #documents #form textarea +{ + margin-bottom: 2px; + /*width: 100%;*/ +} + +#content #documents #form input, +#content #documents #form textarea +{ + margin-bottom: 2px; + /*width: 98%;*/ +} + +#content #documents #form #start +{ + float: left; + /*width: 45%;*/ +} + +#content #documents #form #rows +{ + float: right; + /* width: 45%;*/ +} + +#content #documents #form .checkbox input +{ + margin-bottom: 0; + width: auto; +} + +#content #documents #form fieldset, +#content #documents #form .optional.expanded +{ + border: 1px solid #fff; + border-top: 1px solid #c0c0c0; + margin-bottom: 5px; +} + +#content #documents #form fieldset.common +{ + margin-top: 10px; +} + +#content #documents #form fieldset legend, +#content #documents #form .optional.expanded legend +{ + display: block; + margin-left: 10px; + padding: 0px 5px; +} + +#content #documents #form fieldset legend label +{ + margin-top: 0; +} + +#content #documents #form fieldset .fieldset +{ + border-bottom: 1px solid #f0f0f0; + margin-bottom: 5px; + padding-bottom: 10px; +} + +#content #documents #form .optional +{ + border: 0; +} + +#content #documents #form .optional .fieldset +{ + display: none; +} + +#content #documents #form .optional legend +{ + margin-left: 0; + padding-left: 0; +} + +#content #documents #form .optional.expanded .fieldset +{ + display: block; +} + +#content #documents #file-upload{ + display: none; +} + +#content #documents #result +{ + display: none; + float: right; + width: 54%; +} + +#content #documents #result #url +{ + margin-bottom: 10px; + background-image: url( ../../img/ico/ui-address-bar.png ); + background-position: 5px 50%; + border: 1px solid #f0f0f0; + box-shadow: 1px 1px 0 #f0f0f0; + -moz-box-shadow: 1px 1px 0 #f0f0f0; + -webkit-box-shadow: 1px 1px 0 #f0f0f0; + color: #c0c0c0; + display: block; + overflow: hidden; + padding: 5px; + padding-left: 26px; + white-space: nowrap; +} + +#content #documents #result #url:focus, +#content #documents #result #url:hover +{ + border-color: #c0c0c0; + box-shadow: 1px 1px 0 #d8d8d8; + -moz-box-shadow: 1px 1px 0 #d8d8d8; + -webkit-box-shadow: 1px 1px 0 #d8d8d8; + color: #333; +} + +#content #documents #result #response +{ +} + +#content #documents #result #response pre +{ + padding-left: 20px; +} + +.description{ + font-weight: bold; +} + +#upload-only{ + display: none; +} + +#document-type{ + padding-bottom: 5px; +} + +#wizard{ + display: none; +} + +#wizard-fields div{ + padding-top: 5px; + padding-bottom: 5px; +} + +#wiz-field-data, #wiz-field-data span{ + vertical-align: top; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/files.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/files.css new file mode 100644 index 0000000000..792cc31fe6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/files.css @@ -0,0 +1,54 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #files #tree-holder +{ + float: left; + width: 20%; +} + +#content #files #tree-holder li +{ + overflow: hidden; +} + +#content #files form .buttons button +{ + float: right; +} + +#content #files #file-content +{ + display: none; + float: right; + position: relative; + width: 78%; + min-height: 100px +} + +#content #files .show #file-content +{ + display: block; +} + +#content #files #file-content .response +{ + border: 1px solid transparent; + padding: 2px; +} \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/index.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/index.css new file mode 100644 index 0000000000..288e040a2a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/index.css @@ -0,0 +1,207 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #index .bar-desc +{ + color: #c0c0c0; + font-weight: normal; + margin-left: 10px; + white-space: pre; +} + +#content #index .bar-holder +{ + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + height: 35px; +} + +#content #index .bar-holder .bar +{ + height: 100%; + position: relative; +} + +#content #index .bar-holder div .val +{ + border-right: 1px solid #f00; + display: block; + padding-right: 5px; + position: absolute; + right: 0; + top: 35px; + white-space: nowrap; +} + +#content #index .bar-holder .bar-max.bar +{ + background-color: #f0f0f0; +} + +#content #index .bar-holder .bar-max.val +{ + border-color: #f0f0f0; + color: #d6d6d6; +} + +#content #index .bar-holder .bar-total.bar +{ + background-color: #c0c0c0; +} + +#content #index .bar-holder .bar-total.val +{ + border-color: #c0c0c0; + color: #c0c0c0; +} + +#content #index .bar-holder .bar-used.bar +{ + background-color: #969696; +} + +#content #index .bar-holder .bar-used.val +{ + border-color: #969696; + color: #969696; +} + +#content #index .bar-holder.bar-lvl-2 .bar-max.val { padding-top: 25px; } +#content #index .bar-holder.bar-lvl-2 .bar-total.val { padding-top: 5px; } +#content #index .bar-holder.bar-lvl-2 { margin-bottom: 45px; } + +#content #index .bar-holder.bar-lvl-3 .bar-max.val { padding-top: 45px; } +#content #index .bar-holder.bar-lvl-3 .bar-total.val { padding-top: 25px; } +#content #index .bar-holder.bar-lvl-3 .bar-used.val { padding-top: 5px; } +#content #index .bar-holder.bar-lvl-3 { margin-bottom: 65px; } + +#content #index .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #index .index-left +{ + float: left; + width: 55%; +} + +#content #index .index-right +{ + float: right; + width: 40%; +} + +#content #index .data li +{ + display: none; + padding-top: 3px; + padding-bottom: 3px; +} + +#content #index .data li dt +{ + float: left; + white-space: nowrap; + width: 20%; +} + +#content #index .data li dd +{ + float: right; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + width: 80% +} + +#content #index .data li dd.odd +{ + color: #999; +} + +#content #index .data dt span +{ + background-position: 1px 50%; + display: block; + padding-left: 22px; +} + +#content #index #instance h2 { background-image: url( ../../img/ico/server.png ); } +#content #index #instance .start_time dt span { background-image: url( ../../img/ico/clock-select.png ); } + +#content #index #versions h2 { background-image: url( ../../img/ico/property.png ); } +#content #index #versions .solr span { background-image: url( ../../img/solr-ico.png ); } +#content #index #versions .lucene span { background-image: url( ../../img/lucene-ico.png ); } + +#content #index #jvm h2 { background-image: url( ../../img/ico/jar.png ); } +#content #index #jvm .jvm_version dt span { background-image: url( ../../img/ico/jar.png ); } +#content #index #jvm .processors dt span { background-image: url( ../../img/ico/processor.png ); } +#content #index #jvm .command_line_args dt span { background-image: url( ../../img/ico/terminal.png ); } + +#content #index #system h2 { background-image: url( ../../img/ico/system-monitor.png ); } + +#content #index #system +{ + position: relative; +} + +#content #index #system .reload +{ + background-image: url( ../../img/ico/arrow-circle.png ); + background-position: 50% 50%; + display: block; + height: 30px; + position: absolute; + right: 0; + top: 0; + width: 30px; +} + +#content #index #system .reload.loader +{ + padding-left: 0; +} + +#content #index #system .reload span +{ + display: none; +} + +#content #index #system .content p +{ + margin-top: 10px; + margin-bottom: 5px; +} + +#content #index #system .content .no-info +{ + color: #c0c0c0; + display: none; + font-style: italic; +} + +#content #index #jvm-memory h2 { background-image: url( ../../img/ico/memory.png ); } + +#content #index #jvm-memory-bar +{ + margin-top: 20px; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/java-properties.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/java-properties.css new file mode 100644 index 0000000000..ab5b67bf64 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/java-properties.css @@ -0,0 +1,52 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #java-properties .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #java-properties li +{ + padding-top: 3px; + padding-bottom: 3px; +} + +#content #java-properties li.odd +{ + background-color: #f8f8f8; +} + +#content #java-properties li dt +{ + float: left; + width: 29%; +} + +#content #java-properties li dd +{ + float: right; + width: 70% +} + +#content #java-properties li dd.odd +{ + color: #999; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/logging.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/logging.css new file mode 100644 index 0000000000..6d309575de --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/logging.css @@ -0,0 +1,391 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #logging .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #logging .block h2 +{ + background-image: url( ../../img/ico/document-text.png ); + margin-bottom: 10px; +} + +#content #logging .block h2 span span +{ + color: #c0c0c0; + font-weight: normal; + margin-left: 10px; +} + +#content #logging #viewer +{ + position: relative; +} + +#content #logging #viewer time +{ + white-space: pre; +} + +#content #logging #viewer #footer +{ + margin-top: 20px; +} + +#content #logging #viewer #state +{ + background-position: 0 50%; + float: left; + color: #c0c0c0; + padding-left: 21px; + width: 45%; +} + +#content #logging #viewer #date-format +{ + float: right; +} + +#content #logging #viewer #date-format a +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #c0c0c0; + display: block; + padding-left: 21px; +} + +#content #logging #viewer #date-format a:hover +{ + color: #008; +} + +#content #logging #viewer #date-format a.on +{ + background-image: url( ../../img/ico/ui-check-box.png ); + color: #333; +} + +#content #logging #viewer table +{ + border-collapse: collapse; + width: 100%; +} + +#content #logging #viewer th, +#content #logging #viewer td a, +#content #logging #viewer tbody .trace td +{ + padding: 3px 10px; +} + +#content #logging #viewer td +{ + vertical-align: top; +} + +#content #logging #viewer td a +{ + display: block; +} + +#content #logging #viewer thead th +{ + font-weight: bold; + text-align: left; +} + +#content #logging #viewer tbody td, +#content #logging #viewer tfoot td +{ + border-top: 1px solid #f0f0f0; +} + +#content #logging #viewer thead th.message +{ + width:100%; +} + +#content #logging #viewer tbody td.span a +{ + padding-left: 0; + padding-right: 0; +} + +#content #logging #viewer tbody span +{ + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#content #logging #viewer tbody .level-info .level span { background-color: #ebf5eb; } +#content #logging #viewer tbody .level-warning span { background-color: #FFD930; } +#content #logging #viewer tbody .level-severe span { background-color: #c43c35; color: #fff; } + +#content #logging #viewer tbody .level-debug span { background-color: #ebf5eb; } +#content #logging #viewer tbody .level-warn span { background-color: #FFD930; } +#content #logging #viewer tbody .level-error span { background-color: #FF6130; } +#content #logging #viewer tbody .level-fatal span { background-color: #c43c35; } + +#content #logging #viewer tbody .has-trace a +{ + cursor: pointer; +} + +#content #logging #viewer tbody .has-trace a:hover +{ + color: #008; +} + +#content #logging #viewer tbody .has-trace .message a +{ + background-image: url( ../../img/ico/information.png ); + background-position: 100% 50%; + display: block; + padding-right: 21px; +} + +#content #logging #viewer tbody .has-trace.open .message a +{ + background-image: url( ../../img/ico/information-white.png ); +} + +#content #logging #viewer tbody .trace +{ + display: none; +} + +#content #logging #viewer tbody .trace td +{ + border-top: 0; + color: #c0c0c0; +} + +#content #logging #viewer .has-data tfoot +{ + display: none; +} + +#content #logging #viewer tfoot td +{ + color: #c0c0c0; +} + +#content #logging .jstree > li +{ + margin-left: 0; +} + +#content #logging .jstree li +{ + position: relative; +} + +#content #logging .jstree .level-finest { background-color: #d5e5fc; } +#content #logging .jstree .level-fine { background-color: #d5fafc; } +#content #logging .jstree .level-config { background-color: #e6fded; } +#content #logging .jstree .level-info { background-color: #fafcd7; } +#content #logging .jstree .level-warning { background-color: #fcecd5; } +#content #logging .jstree .level-severe { background-color: #fcdcda; } +#content #logging .jstree .level-off { background-color: #ffffff; } + +/* Log4j */ +#content #logging .jstree .level-all { background-color: #9EDAFF; } +#content #logging .jstree .level-trace { background-color: #d5e5fc; } +#content #logging .jstree .level-debug { background-color: #d5fafc; } +#content #logging .jstree .level-warn { background-color: #e6fded; } +#content #logging .jstree .level-error { background-color: #fcecd5; } +#content #logging .jstree .level-fatal { background-color: #fcdcda; } + + +#content #logging .jstree a +{ + height: 17px; + line-height: 17px; + padding: 0; + width: 90%; +} + +#content #logging .jstree a:hover +{ + color: #008; +} + +#content #logging .jstree a span.ns +{ + display: none; +} + +#content #logging.ns .jstree a span.ns +{ + display: inline; +} + +#content #logging .jstree a span.name +{ + background-position: 100% 50%; + cursor: pointer; + padding-right: 21px; +} + +#content #logging .jstree a span.name em +{ + color: #f00; + font-style: normal; + text-transform: uppercase; +} + +#content #logging .jstree a.trigger.set +{ + font-weight: bold; +} + +#content #logging .jstree a:hover span.name +{ + background-image: url( ../../img/ico/pencil-small.png ); +} + +#content #logging .jstree .selector-holder +{ + position: absolute; + top: -2px; + z-index: 700; +} + +#content #logging .jstree .selector-holder.open +{ + background-color: #fff; + margin-left: -19px; + z-index: 800; +} + +#content #logging .jstree li .selector-holder { left: 440px; } +#content #logging .jstree li li .selector-holder { left: 422px; } +#content #logging .jstree li li li .selector-holder { left: 404px; } +#content #logging .jstree li li li li .selector-holder { left: 386px; } +#content #logging .jstree li li li li li .selector-holder { left: 368px; } +#content #logging .jstree li li li li li li .selector-holder { left: 350px; } +#content #logging .jstree li li li li li li li .selector-holder { left: 332px; } +#content #logging .jstree li li li li li li li li .selector-holder { left: 314px; } + +#content #logging .jstree .selector +{ + border: 1px solid transparent; + position: relative; +} + +#content #logging .jstree .open .selector +{ + border-color: #f0f0f0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; +} + +#content #logging .jstree .selector a +{ + display: block; + padding: 2px; + width: auto; +} + +#content #logging .jstree .selector .close +{ + display: none; +} + +#content #logging .jstree .open .selector .close +{ + background-image: url( ../../img/ico/cross-0.png ); + background-position: 50% 50%; + display: block; + position: absolute; + right: -25px; + top: 0; + width: 20px; +} + +#content #logging .jstree .open .selector .close:hover +{ + background-image: url( ../../img/ico/cross-1.png ); +} + +#content #logging .jstree .open .selector .close span +{ + display: none; +} + +#content #logging .jstree .open .selector a.trigger +{ + display: none; +} + +#content #logging .jstree .selector ul +{ + display: none; +} + +#content #logging .jstree .open .selector ul +{ + display: block; +} + +#content #logging .jstree .selector ul li +{ + background: none; + margin-left: 0; +} + +#content #logging .jstree .selector ul li a +{ + background-image: url( ../../img/ico/ui-radio-button-uncheck.png ); + background-position: 2px 50%; + padding-left: 21px; +} + +#content #logging .jstree .selector ul li a.level +{ + background-color: #f0f0f0; +} + +#content #logging .jstree .selector ul li a:hover +{ + background-image: url( ../../img/ico/ui-radio-button.png ); +} + +#content #logging .jstree .selector li.unset +{ + border-top: 1px solid #f0f0f0; +} + +#content #logging .jstree .selector li.unset a +{ + background-image: url( ../../img/ico/cross-0.png ); + background-position: 4px 50%; +} + +#content #logging .jstree .selector li.unset a:hover +{ + background-image: url( ../../img/ico/cross-1.png ); + color: #800; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/menu.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/menu.css new file mode 100644 index 0000000000..f4fa68f8f2 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/menu.css @@ -0,0 +1,329 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#menu-wrapper +{ + position: fixed; + top: 120px; + width: 150px; +} + +.scroll #menu-wrapper +{ + position: absolute; + top: 90px; +} + +.has-environment #menu-wrapper +{ + top: 160px; +} + +#menu-wrapper a +{ + display: block; + padding: 4px 2px; + overflow: hidden; + text-overflow: ellipsis; +} + +#core-selector +{ + margin-top: 20px; + padding-right: 10px; +} + +#core-selector a +{ + padding: 0; + padding-left: 8px; +} + +#core-selector select +{ + width: 100%; +} + +#core-selector #has-no-cores +{ + display: none; +} + +#core-selector #has-no-cores a +{ + background-image: url( ../../img/ico/database--plus.png ); +} + +#core-selector #has-no-cores span +{ + color: #c0c0c0; + display: block; +} + +#menu-wrapper .active p +{ + background-color: #fafafa; + border-color: #c0c0c0; +} + +#menu-wrapper p a, +#menu a +{ + background-position: 5px 50%; + padding-left: 26px; + padding-top: 5px; + padding-bottom: 5px; +} + +#menu-wrapper p a:hover +{ + background-color: #f0f0f0; +} + +#menu-wrapper .active p a +{ + background-color: #c0c0c0; + font-weight: bold; +} + +#menu p.loader +{ + background-position: 5px 50%; + color: #c0c0c0; + margin-top: 5px; + padding-left: 26px; +} + +#menu p a small +{ + color: #b5b5b5; + font-weight: normal; +} + +#menu p a small span.txt +{ + display: none; +} + +#menu p a small:hover span.txt +{ + display: inline; +} + +#menu .busy +{ + border-right-color: #f6f5d9; +} + +#menu .busy p a +{ + background-color: #f6f5d9; + background-image: url( ../../img/ico/status-away.png ); +} + +#menu .offline +{ + border-right-color: #eccfcf; +} + +#menu .offline p a +{ + background-color: #eccfcf; + background-image: url( ../../img/ico/status-busy.png ); +} + +#menu .online +{ + border-right-color: #cfecd3; +} + +#menu .online p a +{ + background-color: #cfecd3; + background-image: url( ../../img/ico/status.png ); +} + +#menu .ping small +{ + color: #000 +} + +#menu li +{ + border-bottom: 1px solid #f0f0f0; +} + +#menu li:last-child +{ + border-bottom: 0; +} + +#menu li.optional +{ + display: none; +} + +#core-menu p +{ + border-top: 1px solid #f0f0f0; +} + +#core-menu li:first-child p +{ + border-top: 0; +} + +#core-menu p a +{ + background-image: url( ../../img/ico/status-offline.png ); +} + +#core-menu .active p a +{ + background-image: url( ../../img/ico/box.png ); +} + +#core-menu ul, +#menu ul +{ + display: none; + padding-top: 5px; + padding-bottom: 10px; +} + +#core-menu .active ul, +#menu .active ul +{ + display: block; +} + +#menu ul li +{ + border-bottom: 0; +} + +#core-menu ul li a, +#menu ul li a +{ + background-position: 7px 50%; + border-bottom: 1px solid #f0f0f0; + color: #bbb; + margin-left: 15px; + padding-left: 26px; +} + +#core-menu ul li:last-child a, +#menu ul li:last-child a +{ + border-bottom: 0; +} + +#core-menu ul li a:hover, +#menu ul li a:hover +{ + background-color: #f0f0f0; + color: #333; +} + +#core-menu ul li.active a, +#menu ul li.active a +{ + background-color: #d0d0d0; + border-color: #d0d0d0; + color: #333; +} + +#menu #index.global p a { background-image: url( ../../img/ico/dashboard.png ); } + +#menu #logging.global p a { background-image: url( ../../img/ico/inbox-document-text.png ); } +#menu #logging.global .level a { background-image: url( ../../img/ico/gear.png ); } + +#menu #java-properties.global p a { background-image: url( ../../img/ico/jar.png ); } + +#menu #threads.global p a { background-image: url( ../../img/ico/ui-accordion.png ); } + +#menu #cores.global p a { background-image: url( ../../img/ico/databases.png ); } + +#menu #cloud.global p a { background-image: url( ../../img/ico/network-cloud.png ); } +#menu #cloud.global .tree a { background-image: url( ../../img/ico/folder-tree.png ); } +#menu #cloud.global .graph a { background-image: url( ../../img/ico/molecule.png ); } +#menu #cloud.global .rgraph a { background-image: url( ../../img/ico/asterisk.png ); } +#menu #cloud.global .dump a { background-image: url( ../../img/ico/download-cloud.png ); } + +#core-menu .ping.error a +{ + + background-color: #ffcccc; + background-image: url( ../../img/ico/system-monitor--exclamation.png ); + border-color: #ffcccc; + cursor: help; +} + +#core-menu .overview a { background-image: url( ../../img/ico/home.png ); } +#core-menu .query a { background-image: url( ../../img/ico/magnifier.png ); } +#core-menu .analysis a { background-image: url( ../../img/ico/funnel.png ); } +#core-menu .documents a { background-image: url( ../../img/ico/documents-stack.png ); } +#core-menu .files a { background-image: url( ../../img/ico/folder.png ); } +#core-menu .schema-browser a { background-image: url( ../../img/ico/book-open-text.png ); } +#core-menu .replication a { background-image: url( ../../img/ico/node.png ); } +#core-menu .distribution a { background-image: url( ../../img/ico/node-select.png ); } +#core-menu .ping a { background-image: url( ../../img/ico/system-monitor.png ); } +#core-menu .logging a { background-image: url( ../../img/ico/inbox-document-text.png ); } +#core-menu .plugins a { background-image: url( ../../img/ico/block.png ); } +#core-menu .dataimport a { background-image: url( ../../img/ico/document-import.png ); } +#core-menu .segments a { background-image: url( ../../img/ico/construction.png ); } + + +#content #navigation +{ + border-right: 1px solid #e0e0e0; +} + +#content #navigation a +{ + display: block; + padding: 4px 2px; +} + +#content #navigation .current +{ + border-color: #e0e0e0; +} + +#content #navigation a +{ + background-position: 5px 50%; + padding-left: 26px; + padding-top: 5px; + padding-bottom: 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#content #navigation a:hover +{ + background-color: #f0f0f0; +} + +#content #navigation .current a +{ + background-color: #e0e0e0; + font-weight: bold; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/plugins.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/plugins.css new file mode 100644 index 0000000000..f8ea76934f --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/plugins.css @@ -0,0 +1,195 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #plugins #navigation +{ + width: 20%; +} + +#content #plugins #navigation .cache a { background-image: url( ../../img/ico/disk-black.png ); } +#content #plugins #navigation .core a { background-image: url( ../../img/ico/wooden-box.png ); } +#content #plugins #navigation .other a { background-image: url( ../../img/ico/zone.png ); } +#content #plugins #navigation .highlighting a { background-image: url( ../../img/ico/highlighter-text.png ); } +#content #plugins #navigation .updatehandler a{ background-image: url( ../../img/ico/arrow-circle.png ); } +#content #plugins #navigation .queryhandler a { background-image: url( ../../img/ico/magnifier.png ); } +#content #plugins #navigation .queryparser a { background-image: url( ../../img/ico/asterisk.png ); } + +#content #plugins #navigation .PLUGINCHANGES { margin-top: 20px; } +#content #plugins #navigation .PLUGINCHANGES a { background-image: url( ../../img/ico/eye.png ); } +#content #plugins #navigation .RELOAD a { background-image: url( ../../img/ico/arrow-circle.png ); } + + +#content #plugins #navigation a +{ + position: relative; +} + +#content #plugins #navigation a span +{ + background-color: #bba500; + border-radius: 5px; + color: #fff; + font-size: 10px; + font-weight: normal; + line-height: 1.4em; + padding-left: 4px; + padding-right: 4px; + position: absolute; + right: 5px; + top: 7px; +} + +#content #plugins #frame +{ + float: right; + width: 78%; +} + +#content #plugins #frame .entry +{ + margin-bottom: 10px; +} + +#content #plugins #frame .entry:last-child +{ + margin-bottom: 0; +} + +#content #plugins #frame .entry a +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 0 50%; + display: block; + font-weight: bold; + padding-left: 21px; +} + +#content #plugins #frame .entry.changed a span +{ + color: #bba500; +} + +#content #plugins #frame .entry.expanded a +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #plugins #frame .entry.expanded ul +{ + display: block; +} + +#content #plugins #frame .entry ul +{ + border-left: 9px solid #f0f3ff; + display: none; + margin-left: 3px; + padding-top: 5px; + padding-left: 10px; +} + +#content #plugins #frame .entry li +{ + padding-top: 2px; + padding-bottom: 2px; +} + +#content #plugins #frame .entry li.stats +{ + border-top: 1px solid #c0c0c0; + margin-top: 5px; + padding-top: 5px; +} + +#content #plugins #frame .entry li.odd +{ + background-color: #f8f8f8; +} + +#content #plugins #frame .entry dt, +#content #plugins #frame .entry .stats span +{ + float: left; + width: 11%; +} + +#content #plugins #frame .entry dd, +#content #plugins #frame .entry .stats ul +{ + float: right; + width: 88%; +} + +#content #plugins #frame .entry .stats ul +{ + border-left: 0; + margin: 0; + padding: 0; +} + +#content #plugins #frame .entry .stats dt +{ + width: 27%; +} + +#content #plugins #frame .entry .stats dd +{ + width: 72%; +} + +#content #plugins #frame .entry.expanded a.linker { + background-image: none; + background-position: 0 0; + display: inline; + font-weight: normal; + padding:0px; +} + +#content #plugins #frame .entry.expanded a.linker:hover { + background-color:#F0F3FF; +} + +#recording +{ + display: none; +} + +#recording .wrapper +{ + padding: 30px; +} + +#recording p +{ + background-position: 0 50%; + float: left; + padding-left: 21px; + padding-top: 7px; + padding-bottom: 7px; +} + +#recording button +{ + float: right; +} + +#recording button span +{ + background-image: url( ../../img/ico/new-text.png ); +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/query.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/query.css new file mode 100644 index 0000000000..9fd7913946 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/query.css @@ -0,0 +1,173 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #query +{ + background-image: url( ../../img/div.gif ); + background-position: 22% 0; + background-repeat: repeat-y; +} + +#content #query #form +{ + float: left; + width: 21%; +} + +#content #query #form label +{ + cursor: pointer; + display: block; + margin-top: 5px; +} + +#content #query #form input, +#content #query #form select, +#content #query #form textarea +{ + margin-bottom: 2px; + width: 100%; +} + +#content #query #form input, +#content #query #form textarea +{ + width: 98%; +} + +#content #query #form .multiple input +{ + float: left; + width: 80% +} + +#content #query #form .multiple .buttons +{ + float: right; + width: 16%; +} + + +#content #query #form .multiple a +{ + background-position: 50% 50%; + display: block; + height: 25px; + width: 49%; +} + +#content #query #form .multiple a span +{ + display: none; +} + +#content #query #form .multiple a.add +{ + background-image: url( ../../img/ico/plus-button.png ); + float: right; +} + +#content #query #form .multiple a.rem +{ + background-image: url( ../../img/ico/minus-button.png ); + float: left; +} + +#content #query #form #start +{ + float: left; + width: 45%; +} + +#content #query #form #rows +{ + float: right; + width: 45%; +} + +#content #query #form .checkbox input +{ + margin-bottom: 0; + width: auto; +} + +#content #query #form fieldset, +#content #query #form .optional.expanded +{ + border: 1px solid #fff; + border-top: 1px solid #c0c0c0; + margin-bottom: 5px; +} + +#content #query #form fieldset.common +{ + margin-top: 10px; +} + +#content #query #form fieldset legend, +#content #query #form .optional.expanded legend +{ + display: block; + margin-left: 10px; + padding: 0px 5px; +} + +#content #query #form fieldset legend label +{ + margin-top: 0; +} + +#content #query #form fieldset .fieldset +{ + border-bottom: 1px solid #f0f0f0; + margin-bottom: 5px; + padding-bottom: 10px; +} + +#content #query #form .optional +{ + border: 0; +} + +#content #query #form .optional .fieldset +{ + display: none; +} + +#content #query #form .optional legend +{ + margin-left: 0; + padding-left: 0; +} + +#content #query #form .optional.expanded .fieldset +{ + display: block; +} + +#content #query #result +{ + display: none; + float: right; + width: 77%; +} + +#content #query #result #response +{ +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/replication.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/replication.css new file mode 100644 index 0000000000..7379504642 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/replication.css @@ -0,0 +1,515 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #replication +{ + background-image: url( ../../img/div.gif ); + background-position: 21% 0; + background-repeat: repeat-y; +} + +#content #replication #frame +{ + float: right; + width: 78%; +} + +#content #replication #navigation +{ + border-right: 0; + float: left; + width: 20%; +} + +#content #replication #error +{ + background-color: #f00; + background-image: url( ../../img/ico/construction.png ); + background-position: 10px 50%; + color: #fff; + display: none; + font-weight: bold; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; +} + +#content #replication .block +{ + border-bottom: 1px solid #c0c0c0; + margin-bottom: 20px; + padding-bottom: 20px; +} + +#content #replication .block.last +{ + border-bottom: 0; +} + +#content #replication .masterOnly, +#content #replication .slaveOnly +{ + display: none; +} + +#content #replication.master .masterOnly +{ + display: block; +} + +#content #replication.slave .slaveOnly +{ + display: block; +} + +#content #replication .replicating +{ + display: none; +} + +#content #replication.replicating .replicating +{ + display: block; +} + +#content #replication #progress +{ + padding-bottom: 80px; + position: relative; +} + +#content #replication #progress .info +{ + padding: 5px; +} + +#content #replication #progress #start +{ + margin-left: 100px; + border-left: 1px solid #c0c0c0; +} + +#content #replication #progress #bar +{ + background-color: #f0f0f0; + margin-left: 100px; + margin-right: 100px; + position: relative; +} + +#content #replication #progress #bar #bar-info, +#content #replication #progress #bar #eta +{ + position: absolute; + right: -100px; + width: 100px; +} + +#content #replication #progress #bar #bar-info +{ + border-left: 1px solid #f0f0f0; + margin-top: 30px; +} + +#content #replication #progress #eta .info +{ + color: #c0c0c0; + height: 30px; + line-height: 30px; + padding-top: 0; + padding-bottom: 0; +} + +#content #replication #progress #speed +{ + color: #c0c0c0; + position: absolute; + right: 100px; + top: 0; +} + +#content #replication #progress #bar #done +{ + background-color: #c0c0c0; + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + height: 30px; + position: relative; +} + +#content #replication #progress #bar #done .percent +{ + font-weight: bold; + height: 30px; + line-height: 30px; + padding-left: 5px; + padding-right: 5px; + position: absolute; + right: 0; + text-align: right; +} + +#content #replication #progress #bar #done #done-info +{ + border-right: 1px solid #c0c0c0; + position: absolute; + right: 0; + margin-top: 30px; + text-align: right; + width: 100px; +} + +#content #replication #progress #bar #done #done-info .percent +{ + font-weight: bold; +} + +#content #replication .block .label, +#content #replication #current-file .file, +#content #replication #current-file .progress, +#content #replication #iterations .iterations +{ + float: left; +} + +#content #replication .block .label +{ + width: 100px; +} + +#content #replication .block .label span +{ + display: block; + padding-left: 21px; +} + +#content #replication #current-file +{ + border-top: 1px solid #f0f0f0; + margin-top: 10px; + padding-top: 10px; +} + +#content #replication #current-file .progress +{ + color: #c0c0c0; + margin-left: 20px; +} + +#content #replication #iterations .label span +{ + background-image: url( ../../img/ico/node-design.png ); +} + +#content #replication #iterations .iterations li +{ + background-position: 100% 50%; + display: none; + padding-right: 21px; +} + +#content #replication #iterations .iterations.expanded li +{ + display: block; +} + +#content #replication #iterations .iterations .latest +{ + display: block; +} + +#content #replication #iterations .iterations .replicated +{ + color: #80c480; +} + +#content #replication #iterations .iterations ul:hover .replicated, +#content #replication #iterations .iterations .replicated.latest +{ + color: #080; +} + +#content #replication #iterations .iterations .replicated.latest +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication #iterations .iterations .failed +{ + color: #c48080; +} + +#content #replication #iterations .iterations ul:hover .failed, +#content #replication #iterations .iterations .failed.latest +{ + color: #800; +} + +#content #replication #iterations .iterations .failed.latest +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #replication #iterations .iterations a +{ + border-top: 1px solid #f0f0f0; + display: none; + margin-top: 2px; + padding-top: 2px; +} + +#content #replication #iterations .iterations a span +{ + background-position: 0 50%; + color: #c0c0c0; + display: none; + padding-left: 21px; +} + +#content #replication #iterations .iterations a span.expand +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + display: block; +} + +#content #replication #iterations .iterations.expanded a span.expand +{ + display: none; +} + +#content #replication #iterations .iterations.expanded a span.collapse +{ + background-image: url( ../../img/ico/chevron-small.png ); + display: block; +} + +#content #replication #details table +{ + margin-left: 20px; + border-collapse: collapse; +} + +#content #replication #details table th +{ + text-align: left; +} + +#content #replication.slave #details table .slaveOnly +{ + display: table-row; +} + +#content #replication #details table thead th +{ + color: #c0c0c0; +} + +#content #replication #details table thead th, +#content #replication #details table tbody td +{ + padding-right: 20px; +} + +#content #replication #details table thead td, +#content #replication #details table thead th, +#content #replication #details table tbody th, +#content #replication #details table tbody td div +{ + padding-top: 3px; + padding-bottom: 3px; +} + +#content #replication #details table tbody td, +#content #replication #details table tbody th +{ + border-top: 1px solid #f0f0f0; +} + +#content #replication #details table thead td +{ + width: 100px; +} + +#content #replication #details table thead td span +{ + background-image: url( ../../img/ico/clipboard-list.png ); + background-position: 0 50%; + display: block; + padding-left: 21px; +} + +#content #replication #details table tbody th +{ + padding-right: 10px; + text-align: right; + white-space: nowrap; +} + +#content #replication #details table tbody .size +{ + text-align: right; + white-space: nowrap; +} + +#content #replication #details table tbody .generation div +{ + text-align: center; +} + +#content #replication #details table tbody .diff div +{ + background-color: #fcfcc9; + padding-left: 1px; + padding-right: 1px; +} + +#content #replication .settings .label span +{ + background-image: url( ../../img/ico/hammer-screwdriver.png ); +} + +#content #replication .settings ul, +#content #replication .settings dl dt, +#content #replication .settings dl dd +{ + float: left; +} + +#content #replication .settings ul li +{ + border-top: 1px solid #f0f0f0; + display: none; + padding-top: 3px; + padding-top: 3px; +} + +#content #replication .settings ul li:first-child +{ + border-top: 0; + padding-top: 0; +} + +#content #replication .settings dl dt +{ + clear: left; + margin-right: 5px; + width: 120px; +} + +#content #replication .settings dl .ico +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #replication .settings dl .ico.ico-0 +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #replication .settings dl .ico.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication .timer +{ + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + display: none; + margin-bottom: 20px; + padding: 10px; +} + +#content #replication .timer p, +#content #replication .timer small +{ + padding-left: 21px; +} + +#content #replication .timer p +{ + background-image: url( ../../img/ico/clock-select-remain.png ); + background-position: 0 50%; +} + +#content #replication .timer p .approx +{ + color: #c0c0c0; + margin-right: 1px; +} + +#content #replication .timer p .tick +{ + font-weight: bold; +} + +#content #replication .timer small +{ + color: #c0c0c0; + display: none; +} + +#content #replication #navigation button +{ + display: block; + margin-bottom: 10px; +} + +#content #replication #navigation button.optional +{ + display: none; +} + +#content #replication #navigation .replicate-now span +{ + background-image: url( ../../img/ico/document-convert.png ); +} + +#content #replication #navigation .abort-replication span +{ + background-image: url( ../../img/ico/hand.png ); +} + +#content #replication #navigation .disable-polling span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #replication #navigation .enable-polling span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication #navigation .disable-replication span +{ + background-image: url( ../../img/ico/cross.png ); +} + +#content #replication #navigation .enable-replication span +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #replication #navigation .refresh-status span +{ + background-image: url( ../../img/ico/arrow-circle.png ); +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/schema-browser.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/schema-browser.css new file mode 100644 index 0000000000..e43de40120 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/schema-browser.css @@ -0,0 +1,578 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #schema-browser .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #schema-browser.loaded +{ + background-image: url( ../../img/div.gif ); + background-position: 21% 0; + background-repeat: repeat-y; +} + +#content #schema-browser #data +{ + float: right; + width: 78%; +} + +#content #schema-browser #related +{ + float: left; + width: 20%; +} + +#content #schema-browser #related select +{ + width: 100%; +} + +#content #schema-browser #related select optgroup +{ + font-style: normal; + padding: 5px; +} + +#content #schema-browser #related select option +{ + padding-left: 10px; +} + +#content #schema-browser #related #f-df-t +{ + border-bottom: 1px solid #f0f0f0; + padding-bottom: 15px; +} + +#content #schema-browser #related .ukf-dsf dt +{ + display: none; +} + +#content #schema-browser #related dl +{ + margin-top: 15px; +} + +#content #schema-browser #related dl dt, +#content #schema-browser #related dl dd a +{ + color: #c0c0c0; +} + +#content #schema-browser #related dl dt +{ + font-weight: bold; + margin-top: 5px; +} + +#content #schema-browser #related dl dd a +{ + display: block; + padding-left: 10px; +} + +#content #schema-browser #related dl dd a:hover +{ + background-color: #f8f8f8; +} + +#content #schema-browser #related .field .field, +#content #schema-browser #related .field .field a, +#content #schema-browser #related .dynamic-field .dynamic-field, +#content #schema-browser #related .dynamic-field .dynamic-field a, +#content #schema-browser #related .type .type, +#content #schema-browser #related .type .type a, +#content #schema-browser #related .active, +#content #schema-browser #related .active a +{ + color: #333; +} + +#content #schema-browser #related .copyfield, +#content #schema-browser #related .copyfield a +{ + color: #666; +} + +#content #schema-browser #data +{ + display: none; +} + +#content #schema-browser #data #index dt +{ + display: none; + float: left; + margin-right: 5px; + width: 150px; +} + +#content #schema-browser #data #field .field-options +{ + margin-bottom: 10px; +} + +#content #schema-browser #data #field .field-options .head h2 +{ + padding-left: 5px; +} + +#content #schema-browser #data #field .partial +{ + display: none; +} + +#content #schema-browser #data #field .partial p +{ + background-image: url( ../../img/ico/exclamation-button.png ); + background-position: 0 50%; + padding-left: 21px; +} + +#content #schema-browser #data #field .field-options .options dt, +#content #schema-browser #data #field .field-options .options dd +{ + float: left; +} + +#content #schema-browser #data #field .field-options .options dt +{ + clear: left; + display: none; + margin-right: 5px; + width: 100px; +} + +#content #schema-browser #data #field .field-options .flags +{ + margin-top: 10px; + margin-bottom: 20px; +} + +#content #schema-browser #data #field .field-options .flags thead td +{ + color: #c0c0c0; + padding-right: 5px; + width: 100px; +} + +#content #schema-browser #data #field .field-options .flags tbody td, +#content #schema-browser #data #field .field-options .flags th +{ + padding: 2px 5px; +} + +#content #schema-browser #data #field .field-options .flags thead td, +#content #schema-browser #data #field .field-options .flags tbody th +{ + padding-left: 0; +} + +#content #schema-browser #data #field .field-options .flags thead th, +#content #schema-browser #data #field .field-options .flags tbody td +{ + border-left: 1px solid #f0f0f0; +} + +#content #schema-browser #data #field .field-options .flags tbody th, +#content #schema-browser #data #field .field-options .flags tbody td +{ + border-top: 1px solid #f0f0f0; +} + +#content #schema-browser #data #field .field-options .flags tbody .check +{ + background-color: #fafdfa; + background-image: url( ../../img/ico/tick.png ); + background-position: 50% 50%; + text-align: center; +} + +#content #schema-browser #data #field .field-options .flags tbody .check span +{ + display: none; +} + +#content #schema-browser #data #field .field-options .flags tbody .text +{ + color: #c0c0c0; +} + +#content #schema-browser #data #field .field-options .analyzer, +#content #schema-browser #data #field .field-options .analyzer li, +#content #schema-browser #data #field .field-options .analyzer ul, +#content #schema-browser #data #field .field-options .analyzer ul li +{ + display: none; +} + +#content #schema-browser #data #field .field-options .analyzer p, +#content #schema-browser #data #field .field-options .analyzer dl +{ + float: left; +} + +#content #schema-browser #data #field .field-options .analyzer p +{ + margin-right: 5px; + text-align: right; + width: 125px; + white-space: pre; +} + +#content #schema-browser #data #field .field-options .analyzer p a +{ + cursor: auto; +} + +#content #schema-browser #data #field .field-options .analyzer p a.analysis +{ + cursor: pointer; + display: block; +} + +#content #schema-browser #data #field .field-options .analyzer p a.analysis span +{ + background-image: url( ../../img/ico/question-white.png ); + background-position: 0 50%; + padding-left: 21px; +} + +#content #schema-browser #data #field .field-options .analyzer p a.analysis:hover span +{ + background-image: url( ../../img/ico/question.png ); + color: #008; +} + +#content #schema-browser #data #field .field-options .analyzer a +{ + cursor: auto; +} + +#content #schema-browser #data #field .field-options .analyzer .toggle +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + cursor: pointer; + display: block; + padding-right: 21px; +} + +#content #schema-browser #data #field .field-options .analyzer .open .toggle +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #schema-browser #data #field .field-options .analyzer li +{ + border-top: 1px solid #f0f0f0; + margin-top: 10px; + padding-top: 10px; +} + +#content #schema-browser #data #field .field-options .analyzer ul +{ + clear: left; + display: none; + margin-left: 55px; + padding-top: 5px; +} + +#content #schema-browser #data #field .field-options .analyzer .open ul +{ + display: block; +} + +#content #schema-browser #data #field .field-options .analyzer ul li +{ + border-top: 1px solid #f8f8f8; + margin-top: 5px; + padding-top: 5px; +} + +#content #schema-browser #data #field .field-options .analyzer ul p +{ + color: #999; + margin-right: 5px; + text-align: right; + width: 70px; +} + +#content #schema-browser #data #field .field-options .analyzer ul dd +{ + margin-left: 20px; +} + +#content #schema-browser #data #field .field-options .analyzer ul dd +{ + background-image: url( ../../img/ico/document-list.png ); + background-position: 0 50%; + color: #c0c0c0; + padding-left: 21px; +} + +#content #schema-browser #data #field .field-options .analyzer ul dd.ico-0 +{ + background-image: url( ../../img/ico/slash.png ); +} + +#content #schema-browser #data #field .field-options .analyzer ul dd.ico-1 +{ + background-image: url( ../../img/ico/tick.png ); +} + +#content #schema-browser #data #field .head +{ + margin-bottom: 5px; +} + +#content #schema-browser #data #field .terminfo-holder +{ + border-top: 1px solid #c0c0c0; + padding-top: 10px; +} + +#content #schema-browser #data #field .terminfo-holder .trigger +{ + float: left; + width: 140px; +} + +#content #schema-browser #data #field .terminfo-holder .trigger button span +{ + background-image: url( ../../img/ico/information.png ); +} + +#content #schema-browser #data #field .terminfo-holder .status +{ + border-left: 1px solid #f0f0f0; + display: none; + float: left; + padding-left: 20px; + padding-right: 20px; +} + +#content #schema-browser #data #field .terminfo-holder.disabled .trigger button span +{ + background-image: url( ../../img/ico/prohibition.png ); +} + +#content #schema-browser #data #field .terminfo-holder.disabled .status +{ + display: block; +} + +#content #schema-browser #data #field .terminfo-holder .trigger .autoload +{ + display: none; +} + +#content #schema-browser #data #field .terminfo-holder.loaded .trigger .autoload +{ + background-image: url( ../../img/ico/ui-check-box-uncheck.png ); + background-position: 0 50%; + color: #c0c0c0; + display: block; + margin-top: 10px; + padding-left: 21px; +} + +#content #schema-browser #data #field .terminfo-holder .trigger .autoload:hover +{ + color: #008; +} + +#content #schema-browser #data #field .terminfo-holder .trigger .autoload.on +{ + background-image: url( ../../img/ico/ui-check-box.png ); + color: #333; +} + +#content #schema-browser #data #field .topterms-holder, +#content #schema-browser #data #field .histogram-holder +{ + border-left: 1px solid #f0f0f0; + display: none; + float: left; + padding-left: 20px; + padding-right: 20px; +} + +#content #schema-browser #data #field .topterms-holder .head input +{ + height: 18px; + line-height: 16px; + text-align: right; + width: 30px; +} + +#content #schema-browser #data #field .topterms-holder .head .max-holder +{ + color: #c0c0c0; +} + +#content #schema-browser #data #field .topterms-holder .head .max-holder:hover .max +{ + color: #008; +} + +#content #schema-browser #data #field .topterms-holder .head #query_link +{ + background-image: url( ../../img/ico/question-white.png ); + background-position: 0 50%; + color: #c0c0c0; + padding-left: 21px; + margin-left: 5px; +} + +#content #schema-browser #data #field .topterms-holder .head #query_link:hover +{ + background-image: url( ../../img/ico/question.png ); +} + + +#content #schema-browser #data #field .topterms-holder .head #query_link span +{ + visibility: hidden; +} + +#content #schema-browser #data #field .topterms-holder .head #query_link:hover span +{ + visibility: visible; +} + +#content #schema-browser .topterms-holder li +{ + border-top: 1px solid #999; + margin-bottom: 5px; +} + +/* possible overwrite with inline style */ +#content #schema-browser .topterms-holder li p +{ + background-color: #999; + color: #fff; + float: left; +} + +#content #schema-browser .topterms-holder li p span +{ + display: block; + padding-right: 2px; + text-align: right; +} + +/* possible overwrite with inline style */ +#content #schema-browser .topterms-holder li ul +{ + margin-left: 30px; +} + +#content #schema-browser .topterms-holder li li +{ + border-top: 0; + margin-bottom: 0; + white-space: nowrap; +} + +#content #schema-browser .topterms-holder li li.odd +{ + background-color: #f0f0f0; +} + +#content #schema-browser .topterms-holder li li a +{ + display: block; + padding-left: 2px; + padding-right: 2px; +} + +#content #schema-browser .topterms-holder li li a:hover +{ + background-color: #c0c0c0; +} + +#content #schema-browser #data #field .histogram-holder ul +{ + margin-left: 25px; +} + +#content #schema-browser #data #field .histogram-holder li +{ + margin-bottom: 2px; + position: relative; + width: 150px; +} + +#content #schema-browser #data #field .histogram-holder li.odd +{ + background-color: #f0f0f0; +} + +#content #schema-browser #data #field .histogram-holder li dl, +#content #schema-browser #data #field .histogram-holder li dt +{ + padding-top: 1px; + padding-bottom: 1px; +} + +#content #schema-browser #data #field .histogram-holder li dl +{ + background-color: #c0c0c0; + min-width: 1px; +} + +#content #schema-browser #data #field .histogram-holder li dt +{ + color: #a0a0a0; + position: absolute; + overflow: hidden; + left: -25px; + top: 0px; +} + +#content #schema-browser #data #field .histogram-holder li dt span +{ + display: block; + padding-right: 4px; + text-align: right; +} + +#content #schema-browser #data #field .histogram-holder li dd +{ + clear: left; + float: left; + margin-left: 2px; + white-space: nowrap; +} + +#content #schema-browser #data #field .histogram-holder li:hover dl +{ + background-color: #b0b0b0; +} + +#content #schema-browser #data #field .histogram-holder li:hover dt +{ + color: #333; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/segments.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/segments.css new file mode 100644 index 0000000000..820f882e5b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/segments.css @@ -0,0 +1,145 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #segments .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #segments .reload +{ + background-image: url( ../../img/ico/arrow-circle.png ); + background-position: 50% 50%; + display: block; + height: 30px; + position: absolute; + right: 10px; + top: 10px; + width: 30px; +} + +#content #segments .reload.loader +{ + padding-left: 0; +} + +#content #segments .reload span +{ + display: none; +} + +#content #segments #result +{ + width: 77%; +} + +#content #segments #result #response +{ + margin-left: 25px; +} + +#content #segments .segments-holder ul { + margin-left: 25px; +} +#content #segments .segments-holder li { + margin-bottom: 2px; + position: relative; + width: 100%; +} + +#content #segments .segments-holder li .toolitp { + display: none; + background: #C8C8C8; + position: absolute; + z-index: 1000; + width:220px; + height:120px; + margin-left: 100%; + opacity: .8; + padding: 5px; + border: 1px solid; + border-radius: 5px; +} + +#content #segments .segments-holder li .toolitp .label { + float: left; + width: 20%; + opacity: 1; +} + +#content #segments .segments-holder li:hover .toolitp { + display:block; +} + +#content #segments .segments-holder li dl, +#content #segments .segments-holder li dt { + padding-bottom: 1px; + padding-top: 1px; +} +#content #segments .segments-holder li dl { + min-width: 1px; +} +#content #segments .segments-holder li dt { + color: #a0a0a0; + left: -45px; + overflow: hidden; + position: absolute; + top: 0; +} +#content #segments .segments-holder li dt div { + display: block; + padding-right: 4px; + text-align: right; +} +#content #segments .segments-holder li dd { + clear: left; + float: left; + margin-left: 2px; + white-space: nowrap; + width: 100%; +} + +#content #segments .segments-holder li dd div.deleted { + background-color: #808080; + padding-left: 5px; +} + +#content #segments .segments-holder li dd div.live { + background-color: #DDDDDD; + float: left; +} + +#content #segments .segments-holder li dd div.start { + float: left; + width: 20%; +} + +#content #segments .segments-holder li dd div.end { + text-align: right; +} + +.merge-candidate { + background-color: #FFC9F9 !important; +} + +#content #segments .segments-holder li dd div.w5 { + width: 20%; + float: left; +} \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/threads.css b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/threads.css new file mode 100644 index 0000000000..c3cb698bee --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/css/styles/threads.css @@ -0,0 +1,172 @@ +/* + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +#content #threads .loader +{ + background-position: 0 50%; + padding-left: 21px; +} + +#content #threads #thread-dump table +{ + border-collapse: collapse; + width: 100%; +} + +#content #threads #thread-dump table .spacer, +#content #threads #thread-dump tbody .state +{ + background-color: #fff; +} + +#content #threads #thread-dump table th, +#content #threads #thread-dump table td +{ + padding: 5px 3px; + vertical-align: top; +} + +#content #threads #thread-dump thead th +{ + background-color: #c8c8c8; + font-weight: bold; + text-align: left; +} + +#content #threads #thread-dump thead th.name +{ + width: 85%; +} + +#content #threads #thread-dump thead th.time +{ + text-align: right; + width: 15%; +} + +#content #threads #thread-dump tbody .odd +{ + background-color: #f0f0f0; +} + +#content #threads #thread-dump tbody .RUNNABLE a +{ + background-image: url( ../../img/ico/tick-circle.png ); +} + +#content #threads #thread-dump tbody .WAITING a, +#content #threads #thread-dump tbody .TIMED_WAITING a +{ + background-image: url( ../../img/ico/hourglass.png ); +} + +#content #threads #thread-dump tbody .WAITING.lock a, +#content #threads #thread-dump tbody .TIMED_WAITING.lock a +{ + background-image: url( ../../img/ico/hourglass--exclamation.png ); +} + +#content #threads #thread-dump tbody .name a +{ + background-position: 0 50%; + cursor: auto; + display: block; + padding-left: 21px; +} + +#content #threads #thread-dump tbody .stacktrace .name a +{ + cursor: pointer; +} + +#content #threads #thread-dump tbody .stacktrace .name a span +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + background-position: 100% 50%; + padding-right: 21px; +} + +#content #threads #thread-dump tbody .stacktrace.open .name a span +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #threads #thread-dump tbody .name p +{ + background-image: url( ../../img/ico/arrow-000-small.png ); + background-position: 0 50%; + color: #c0c0c0; + font-size: 11px; + margin-left: 21px; + padding-left: 21px; +} + +#content #threads #thread-dump tbody .name div +{ + border-top: 1px solid #c0c0c0; + display: none; + margin-left: 21px; + margin-top: 5px; + padding-top: 5px; +} + +#content #threads #thread-dump tbody .open .name div +{ + display: block; +} + +#content #threads #thread-dump tbody .name ul +{ + list-style-type: disc; + margin-left: 0.7em; + padding-left: 0.7em; +} + +#content #threads #thread-dump tbody .time +{ + text-align: right; +} + +#content #threads #thread-dump tbody .details +{ + display: none; +} + +#content #threads .controls +{ + padding-top: 5px; + padding-bottom: 5px; +} + +#content #threads .controls a +{ + background-image: url( ../../img/ico/chevron-small-expand.png ); + padding-left: 21px; +} + +#content #threads.expanded .controls a +{ + background-image: url( ../../img/ico/chevron-small.png ); +} + +#content #threads.expanded .controls .expand, +#content #threads.collapsed .controls .collapse +{ + display: none; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/favicon.ico b/KeywordSearch/release/solr/server/solr-webapp/webapp/favicon.ico new file mode 100644 index 0000000000..e93104ccff Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/favicon.ico differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ZeroClipboard.swf b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ZeroClipboard.swf new file mode 100644 index 0000000000..13bf8e3962 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ZeroClipboard.swf differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/chosen-sprite-2x.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/chosen-sprite-2x.png new file mode 100644 index 0000000000..6b50545202 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/chosen-sprite-2x.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/chosen-sprite.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/chosen-sprite.png new file mode 100644 index 0000000000..113dc9885a Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/chosen-sprite.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/div.gif b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/div.gif new file mode 100644 index 0000000000..963c9e97bd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/div.gif differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/favicon.ico b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/favicon.ico new file mode 100644 index 0000000000..e93104ccff Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/favicon.ico differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/7z.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/7z.png new file mode 100644 index 0000000000..52f7d5d720 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/7z.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/README b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/README new file mode 100644 index 0000000000..f7a8560715 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/README @@ -0,0 +1,27 @@ +http://www.splitbrain.org/projects/file_icons + +Released to the Public Domain +Free to use. Provided as is. No warranties. + +Note: The big majority of icons where created by the creators listed + below. Only a few ones where found on the net. They were too + widespread to determine the original author and thus were + considered public domain. + If you are the author of one of those icons just send a short + mail to either be included in the list below or have the icon + removed from the package. + +Creators: + + Andreas Gohr + Michael Klier + Andreas Barton + Hubert Chathi + Johan Koehne + Rudi von Staden + Daniel Darvish + Andy Pascall + Seth + David Carella + Tom N. Harris + Brandon Carmon Colvin diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ai.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ai.png new file mode 100644 index 0000000000..a999762c89 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ai.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/aiff.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/aiff.png new file mode 100644 index 0000000000..82d523fdb1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/aiff.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/asc.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/asc.png new file mode 100644 index 0000000000..d9fa4a8aae Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/asc.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/audio.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/audio.png new file mode 100644 index 0000000000..98883256d6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/audio.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/bin.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/bin.png new file mode 100644 index 0000000000..fbd174e2d5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/bin.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/bz2.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/bz2.png new file mode 100644 index 0000000000..d48cae0384 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/bz2.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/c.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/c.png new file mode 100644 index 0000000000..efe18f4392 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/c.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cfc.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cfc.png new file mode 100644 index 0000000000..09c149d642 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cfc.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cfm.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cfm.png new file mode 100644 index 0000000000..d755f286f1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cfm.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/chm.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/chm.png new file mode 100644 index 0000000000..53d48f3b51 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/chm.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/class.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/class.png new file mode 100644 index 0000000000..a39f70c161 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/class.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/conf.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/conf.png new file mode 100644 index 0000000000..ddffe6fd1a Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/conf.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cpp.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cpp.png new file mode 100644 index 0000000000..79464401bd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cpp.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cs.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cs.png new file mode 100644 index 0000000000..d5db29ba5d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/cs.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/css.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/css.png new file mode 100644 index 0000000000..04012041c1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/css.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/csv.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/csv.png new file mode 100644 index 0000000000..3a8835360e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/csv.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/deb.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/deb.png new file mode 100644 index 0000000000..9229d87838 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/deb.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/divx.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/divx.png new file mode 100644 index 0000000000..98dab8f808 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/divx.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/doc.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/doc.png new file mode 100644 index 0000000000..932567f8a9 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/doc.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/dot.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/dot.png new file mode 100644 index 0000000000..9f2da1add1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/dot.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/eml.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/eml.png new file mode 100644 index 0000000000..02828e1738 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/eml.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/enc.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/enc.png new file mode 100644 index 0000000000..cb2d7d47eb Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/enc.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/file.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/file.png new file mode 100644 index 0000000000..24d5f328cc Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/file.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/gif.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/gif.png new file mode 100644 index 0000000000..b4c07a9120 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/gif.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/gz.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/gz.png new file mode 100644 index 0000000000..2426bd169c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/gz.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/hlp.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/hlp.png new file mode 100644 index 0000000000..4417d8e2cb Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/hlp.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/htm.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/htm.png new file mode 100644 index 0000000000..1a6812185b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/htm.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/html.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/html.png new file mode 100644 index 0000000000..672cbce420 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/html.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/image.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/image.png new file mode 100644 index 0000000000..f83e2898d5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/image.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/iso.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/iso.png new file mode 100644 index 0000000000..1b2ff19ca7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/iso.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jar.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jar.png new file mode 100644 index 0000000000..4db70a2c72 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jar.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/java.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/java.png new file mode 100644 index 0000000000..7489b97213 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/java.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jpeg.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jpeg.png new file mode 100644 index 0000000000..aa4cc23a5b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jpeg.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jpg.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jpg.png new file mode 100644 index 0000000000..1fb6cc1fbf Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/jpg.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/js.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/js.png new file mode 100644 index 0000000000..7db4de7e98 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/js.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/lua.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/lua.png new file mode 100644 index 0000000000..7c07d023f9 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/lua.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/m.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/m.png new file mode 100644 index 0000000000..aa0cbae8b1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/m.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mm.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mm.png new file mode 100644 index 0000000000..b737571c5e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mm.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mov.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mov.png new file mode 100644 index 0000000000..7e7aa368f7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mov.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mp3.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mp3.png new file mode 100644 index 0000000000..928705d7a5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mp3.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mpg.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mpg.png new file mode 100644 index 0000000000..9a3f8ea51e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/mpg.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odc.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odc.png new file mode 100644 index 0000000000..47f65c84d3 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odc.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odf.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odf.png new file mode 100644 index 0000000000..a2fbc5195a Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odf.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odg.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odg.png new file mode 100644 index 0000000000..434f18262f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odg.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odi.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odi.png new file mode 100644 index 0000000000..74f6303d3d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odi.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odp.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odp.png new file mode 100644 index 0000000000..a5c77f845f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odp.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ods.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ods.png new file mode 100644 index 0000000000..2ab1273f0d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ods.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odt.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odt.png new file mode 100644 index 0000000000..b0c21fc1fd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/odt.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ogg.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ogg.png new file mode 100644 index 0000000000..62cea6aaa4 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ogg.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pdf.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pdf.png new file mode 100644 index 0000000000..638066dea6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pdf.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pgp.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pgp.png new file mode 100644 index 0000000000..e6b35f36ed Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pgp.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/php.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/php.png new file mode 100644 index 0000000000..44c0fe0a08 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/php.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pl.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pl.png new file mode 100644 index 0000000000..ad2324e359 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/pl.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/png.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/png.png new file mode 100644 index 0000000000..f0b5b00eee Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/png.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ppt.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ppt.png new file mode 100644 index 0000000000..adaefc6025 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ppt.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ps.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ps.png new file mode 100644 index 0000000000..487c3cb7c2 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ps.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/py.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/py.png new file mode 100644 index 0000000000..9e31edb553 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/py.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ram.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ram.png new file mode 100644 index 0000000000..1a54d76543 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/ram.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rar.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rar.png new file mode 100644 index 0000000000..a6af4d1cac Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rar.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rb.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rb.png new file mode 100644 index 0000000000..30670165f9 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rb.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rm.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rm.png new file mode 100644 index 0000000000..a2db68e32d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rm.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rpm.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rpm.png new file mode 100644 index 0000000000..22212eafac Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rpm.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rtf.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rtf.png new file mode 100644 index 0000000000..d8bada5fe1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/rtf.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sig.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sig.png new file mode 100644 index 0000000000..3d8b19d2b3 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sig.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sql.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sql.png new file mode 100644 index 0000000000..f60054a3af Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sql.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/swf.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/swf.png new file mode 100644 index 0000000000..0729ed0203 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/swf.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxc.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxc.png new file mode 100644 index 0000000000..419c183c1f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxc.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxd.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxd.png new file mode 100644 index 0000000000..5801bb23a6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxd.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxi.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxi.png new file mode 100644 index 0000000000..2a94290d70 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxi.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxw.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxw.png new file mode 100644 index 0000000000..6da97beb35 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/sxw.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tar.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tar.png new file mode 100644 index 0000000000..5a2f717fc5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tar.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tex.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tex.png new file mode 100644 index 0000000000..e46a5166f9 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tex.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tgz.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tgz.png new file mode 100644 index 0000000000..141acf5647 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/tgz.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/txt.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/txt.png new file mode 100644 index 0000000000..da20009c6e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/txt.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/vcf.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/vcf.png new file mode 100644 index 0000000000..195ab38bc7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/vcf.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/video.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/video.png new file mode 100644 index 0000000000..b89fc52995 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/video.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/vsd.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/vsd.png new file mode 100644 index 0000000000..d14b81d989 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/vsd.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wav.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wav.png new file mode 100644 index 0000000000..79e80760e2 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wav.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wma.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wma.png new file mode 100644 index 0000000000..6854de7722 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wma.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wmv.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wmv.png new file mode 100644 index 0000000000..b26f45d5f3 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/wmv.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xls.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xls.png new file mode 100644 index 0000000000..e8cd58dc0f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xls.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xml.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xml.png new file mode 100644 index 0000000000..eb46323979 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xml.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xpi.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xpi.png new file mode 100644 index 0000000000..5e537e2375 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xpi.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xvid.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xvid.png new file mode 100644 index 0000000000..d8429dc1ae Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/xvid.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/zip.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/zip.png new file mode 100644 index 0000000000..999ffbe807 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/filetypes/zip.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-000-small.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-000-small.png new file mode 100644 index 0000000000..cfc2e2493f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-000-small.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-circle.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-circle.png new file mode 100644 index 0000000000..dda7132750 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-circle.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-switch.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-switch.png new file mode 100644 index 0000000000..ab3dd3021d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/arrow-switch.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/asterisk.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/asterisk.png new file mode 100644 index 0000000000..c2fbed5a74 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/asterisk.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/battery.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/battery.png new file mode 100644 index 0000000000..7a825b0257 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/battery.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/block-small.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/block-small.png new file mode 100644 index 0000000000..7cc52813cd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/block-small.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/block.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/block.png new file mode 100644 index 0000000000..ed7ec0e972 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/block.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/book-open-text.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/book-open-text.png new file mode 100644 index 0000000000..069fae7c95 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/book-open-text.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/box.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/box.png new file mode 100644 index 0000000000..3ec0ceb131 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/box.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/bug.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/bug.png new file mode 100644 index 0000000000..242d5391c1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/bug.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chart.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chart.png new file mode 100644 index 0000000000..d3cb71d5c5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chart.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chevron-small-expand.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chevron-small-expand.png new file mode 100644 index 0000000000..06a8eaca13 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chevron-small-expand.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chevron-small.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chevron-small.png new file mode 100644 index 0000000000..b54fd1c7c2 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/chevron-small.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-list.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-list.png new file mode 100644 index 0000000000..e98c567563 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-list.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-paste-document-text.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-paste-document-text.png new file mode 100644 index 0000000000..08647f1bee Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-paste-document-text.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-paste.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-paste.png new file mode 100644 index 0000000000..0cf8887292 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clipboard-paste.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clock-select-remain.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clock-select-remain.png new file mode 100644 index 0000000000..8c665b812e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clock-select-remain.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clock-select.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clock-select.png new file mode 100644 index 0000000000..8c567916c8 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/clock-select.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/construction.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/construction.png new file mode 100644 index 0000000000..8347aa896f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/construction.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-0.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-0.png new file mode 100644 index 0000000000..04fef989e7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-0.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-1.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-1.png new file mode 100644 index 0000000000..830879b618 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-1.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-button.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-button.png new file mode 100644 index 0000000000..933272b493 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross-button.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross.png new file mode 100644 index 0000000000..6b9fa6dd36 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/cross.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/dashboard.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/dashboard.png new file mode 100644 index 0000000000..ba03262f0c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/dashboard.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/database--plus.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/database--plus.png new file mode 100644 index 0000000000..2558a7d6a6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/database--plus.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/database.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/database.png new file mode 100644 index 0000000000..d588f422f7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/database.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/databases.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/databases.png new file mode 100644 index 0000000000..11dcab4b1b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/databases.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/disk-black.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/disk-black.png new file mode 100644 index 0000000000..61784784f0 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/disk-black.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-convert.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-convert.png new file mode 100644 index 0000000000..1ecdafb99a Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-convert.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-import.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-import.png new file mode 100644 index 0000000000..5fae085f85 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-import.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-list.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-list.png new file mode 100644 index 0000000000..2b4dde893e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-list.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-text.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-text.png new file mode 100644 index 0000000000..ed841a02a7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/document-text.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/documents-stack.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/documents-stack.png new file mode 100644 index 0000000000..a397f60aaa Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/documents-stack.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/download-cloud.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/download-cloud.png new file mode 100644 index 0000000000..ba0f492fa4 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/download-cloud.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/drive-upload.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/drive-upload.png new file mode 100644 index 0000000000..93589e4da3 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/drive-upload.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/exclamation-button.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/exclamation-button.png new file mode 100644 index 0000000000..e792fb01d5 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/exclamation-button.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/eye.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/eye.png new file mode 100644 index 0000000000..2aead17e09 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/eye.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder-export.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder-export.png new file mode 100644 index 0000000000..86e0cd294c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder-export.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder-tree.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder-tree.png new file mode 100644 index 0000000000..24218b6dbd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder-tree.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder.png new file mode 100644 index 0000000000..ada85c48b8 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/folder.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/funnel-small.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/funnel-small.png new file mode 100644 index 0000000000..96e9e28f25 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/funnel-small.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/funnel.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/funnel.png new file mode 100644 index 0000000000..1f69604528 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/funnel.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/gear.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/gear.png new file mode 100644 index 0000000000..efc599dccd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/gear.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/globe-network.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/globe-network.png new file mode 100644 index 0000000000..ec27fad42b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/globe-network.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/globe.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/globe.png new file mode 100644 index 0000000000..48e5b6b30c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/globe.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hammer-screwdriver.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hammer-screwdriver.png new file mode 100644 index 0000000000..985d44c5e7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hammer-screwdriver.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hammer.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hammer.png new file mode 100644 index 0000000000..cf0ef85a78 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hammer.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hand.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hand.png new file mode 100644 index 0000000000..7b47be2dc9 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hand.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/highlighter-text.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/highlighter-text.png new file mode 100644 index 0000000000..719c537dbb Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/highlighter-text.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/home.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/home.png new file mode 100644 index 0000000000..622a2b736d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/home.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hourglass--exclamation.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hourglass--exclamation.png new file mode 100644 index 0000000000..67436681a1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hourglass--exclamation.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hourglass.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hourglass.png new file mode 100644 index 0000000000..127c5d6156 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/hourglass.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/inbox-document-text.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/inbox-document-text.png new file mode 100644 index 0000000000..4b479cfef6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/inbox-document-text.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-button.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-button.png new file mode 100644 index 0000000000..4ecaf370bd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-button.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-small.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-small.png new file mode 100644 index 0000000000..6db2d56e97 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-small.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-white.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-white.png new file mode 100644 index 0000000000..bd4f552a8b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information-white.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information.png new file mode 100644 index 0000000000..fa9a60b5ad Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/information.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/jar.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/jar.png new file mode 100644 index 0000000000..8711832acc Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/jar.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/magnifier.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/magnifier.png new file mode 100644 index 0000000000..7a5ae62e32 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/magnifier.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/mail.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/mail.png new file mode 100644 index 0000000000..e708416dac Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/mail.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/memory.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/memory.png new file mode 100644 index 0000000000..4c71a247d6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/memory.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/minus-button.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/minus-button.png new file mode 100644 index 0000000000..6dc019a60b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/minus-button.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/molecule.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/molecule.png new file mode 100644 index 0000000000..c4eac4ef4b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/molecule.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-cloud.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-cloud.png new file mode 100644 index 0000000000..0527a92ba1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-cloud.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-away.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-away.png new file mode 100644 index 0000000000..0defbb40d9 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-away.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-busy.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-busy.png new file mode 100644 index 0000000000..ba2c65473c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-busy.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-offline.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-offline.png new file mode 100644 index 0000000000..507ff05959 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status-offline.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status.png new file mode 100644 index 0000000000..12ccc6baff Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network-status.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network.png new file mode 100644 index 0000000000..8224771b0d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/network.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-design.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-design.png new file mode 100644 index 0000000000..fb2d4066c7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-design.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-master.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-master.png new file mode 100644 index 0000000000..c40fcc3ee4 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-master.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-select.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-select.png new file mode 100644 index 0000000000..d2aba04ccb Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-select.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-slave.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-slave.png new file mode 100644 index 0000000000..78a41cd127 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node-slave.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node.png new file mode 100644 index 0000000000..88f1a2bbf1 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/node.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/pencil-small.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/pencil-small.png new file mode 100644 index 0000000000..3d81c2fb13 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/pencil-small.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/pencil.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/pencil.png new file mode 100644 index 0000000000..3ef2fa63e2 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/pencil.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/plus-button.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/plus-button.png new file mode 100644 index 0000000000..10d1f60031 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/plus-button.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/processor.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/processor.png new file mode 100644 index 0000000000..37e9794222 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/processor.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/prohibition.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/prohibition.png new file mode 100644 index 0000000000..18f151071a Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/prohibition.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/property.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/property.png new file mode 100644 index 0000000000..b0e549e453 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/property.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question-small-white.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question-small-white.png new file mode 100644 index 0000000000..132d3f5bad Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question-small-white.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question-white.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question-white.png new file mode 100644 index 0000000000..f806468719 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question-white.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question.png new file mode 100644 index 0000000000..30a47032a4 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/question.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/receipt-invoice.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/receipt-invoice.png new file mode 100644 index 0000000000..fed614079f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/receipt-invoice.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/receipt.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/receipt.png new file mode 100644 index 0000000000..1548b0ac60 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/receipt.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/script-code.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/script-code.png new file mode 100644 index 0000000000..d398622dfd Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/script-code.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/server-cast.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/server-cast.png new file mode 100644 index 0000000000..9213866525 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/server-cast.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/server.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/server.png new file mode 100644 index 0000000000..ee0c771797 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/server.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/sitemap.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/sitemap.png new file mode 100644 index 0000000000..298343eeab Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/sitemap.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/slash.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/slash.png new file mode 100644 index 0000000000..7af3a5189d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/slash.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-away.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-away.png new file mode 100644 index 0000000000..c7be0abbe4 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-away.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-busy.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-busy.png new file mode 100644 index 0000000000..a9d5f4db20 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-busy.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-offline.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-offline.png new file mode 100644 index 0000000000..f148af4985 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status-offline.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status.png new file mode 100644 index 0000000000..680bb8a6a6 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/status.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/system-monitor--exclamation.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/system-monitor--exclamation.png new file mode 100644 index 0000000000..c6f6a5f646 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/system-monitor--exclamation.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/system-monitor.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/system-monitor.png new file mode 100644 index 0000000000..a139103e11 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/system-monitor.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/table.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/table.png new file mode 100644 index 0000000000..b0cd69fc5d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/table.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/terminal.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/terminal.png new file mode 100644 index 0000000000..c18df24f94 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/terminal.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick-circle.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick-circle.png new file mode 100644 index 0000000000..210b1a6c3c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick-circle.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick-red.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick-red.png new file mode 100644 index 0000000000..8ec99b4a69 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick-red.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick.png new file mode 100644 index 0000000000..2414885b85 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/tick.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toggle-small-expand.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toggle-small-expand.png new file mode 100644 index 0000000000..79c5ff7e80 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toggle-small-expand.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toggle-small.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toggle-small.png new file mode 100644 index 0000000000..f783a6f2cb Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toggle-small.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toolbox.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toolbox.png new file mode 100644 index 0000000000..b581d7794d Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/toolbox.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-accordion.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-accordion.png new file mode 100644 index 0000000000..a9f1448e29 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-accordion.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-address-bar.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-address-bar.png new file mode 100644 index 0000000000..1a96ac435e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-address-bar.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-check-box-uncheck.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-check-box-uncheck.png new file mode 100644 index 0000000000..ba447358cc Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-check-box-uncheck.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-check-box.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-check-box.png new file mode 100644 index 0000000000..07f3522a9c Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-check-box.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-radio-button-uncheck.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-radio-button-uncheck.png new file mode 100644 index 0000000000..ec7102b6ef Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-radio-button-uncheck.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-radio-button.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-radio-button.png new file mode 100644 index 0000000000..f83a25496e Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-radio-button.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-text-field-select.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-text-field-select.png new file mode 100644 index 0000000000..3cfe301ac7 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/ui-text-field-select.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/users.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/users.png new file mode 100644 index 0000000000..a6aae0404b Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/users.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/wooden-box.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/wooden-box.png new file mode 100644 index 0000000000..f64d761057 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/wooden-box.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/zone.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/zone.png new file mode 100644 index 0000000000..80fc7be9e0 Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/ico/zone.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/loader-light.gif b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/loader-light.gif new file mode 100644 index 0000000000..f578ca586f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/loader-light.gif differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/loader.gif b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/loader.gif new file mode 100644 index 0000000000..085ccaecaf Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/loader.gif differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/lucene-ico.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/lucene-ico.png new file mode 100644 index 0000000000..43327dd5ac Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/lucene-ico.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/solr-ico.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/solr-ico.png new file mode 100644 index 0000000000..91c35d846f Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/solr-ico.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/solr.svg b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/solr.svg new file mode 100644 index 0000000000..cb4ae64f81 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/solr.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/img/tree.png b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/tree.png new file mode 100644 index 0000000000..61b6b3ee1a Binary files /dev/null and b/KeywordSearch/release/solr/server/solr-webapp/webapp/img/tree.png differ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/index.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/index.html new file mode 100644 index 0000000000..2e01906756 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/index.html @@ -0,0 +1,243 @@ + + + + + + Solr Admin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ +

SolrCore Initialization Failures

+
    +
  • {{core}}: {{error}}
  • +
+

Please check your logs for more information

+ +
+ +
 
+ +
+
+
+ +
+

Connection to Solr lost

+

Please check the Solr instance.

+
+
+

Connection recovered...

+

Continuing to load data...

+
+
+
+
{{exception.msg}}
+
+ + + +
+
+ +
+
+ + + + + +
+ +
+ + + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/app.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/app.js new file mode 100644 index 0000000000..e7491fe63d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/app.js @@ -0,0 +1,799 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +var solrAdminApp = angular.module("solrAdminApp", [ + "ngResource", + "ngRoute", + "ngCookies", + "ngtimeago", + "solrAdminServices", + "localytics.directives" +]); + +solrAdminApp.config([ + '$routeProvider', function($routeProvider) { + $routeProvider. + when('/', { + templateUrl: 'partials/index.html', + controller: 'IndexController' + }). + when('/~logging', { + templateUrl: 'partials/logging.html', + controller: 'LoggingController' + }). + when('/~logging/level', { + templateUrl: 'partials/logging-levels.html', + controller: 'LoggingLevelController' + }). + when('/~cloud', { + templateUrl: 'partials/cloud.html', + controller: 'CloudController' + }). + when('/~cores', { + templateUrl: 'partials/cores.html', + controller: 'CoreAdminController' + }). + when('/~cores/:corename', { + templateUrl: 'partials/cores.html', + controller: 'CoreAdminController' + }). + when('/~collections', { + templateUrl: 'partials/collections.html', + controller: 'CollectionsController' + }). + when('/~collections/:collection', { + templateUrl: 'partials/collections.html', + controller: 'CollectionsController' + }). + when('/~threads', { + templateUrl: 'partials/threads.html', + controller: 'ThreadsController' + }). + when('/~java-properties', { + templateUrl: 'partials/java-properties.html', + controller: 'JavaPropertiesController' + }). + when('/:core', { + templateUrl: 'partials/core_overview.html', + controller: 'CoreOverviewController' + }). + when('/:core/collection-overview', { + templateUrl: 'partials/collection_overview.html', + controller: 'CollectionOverviewController' + }). + when('/:core/analysis', { + templateUrl: 'partials/analysis.html', + controller: 'AnalysisController' + }). + when('/:core/dataimport', { + templateUrl: 'partials/dataimport.html', + controller: 'DataImportController' + }). + when('/:core/dataimport/:handler*', { + templateUrl: 'partials/dataimport.html', + controller: 'DataImportController' + }). + when('/:core/documents', { + templateUrl: 'partials/documents.html', + controller: 'DocumentsController' + }). + when('/:core/files', { + templateUrl: 'partials/files.html', + controller: 'FilesController' + }). + when('/:core/plugins', { + templateUrl: 'partials/plugins.html', + controller: 'PluginsController', + reloadOnSearch: false + }). + when('/:core/plugins/:legacytype', { + templateUrl: 'partials/plugins.html', + controller: 'PluginsController', + reloadOnSearch: false + }). + when('/:core/query', { + templateUrl: 'partials/query.html', + controller: 'QueryController' + }). + when('/:core/stream', { + templateUrl: 'partials/stream.html', + controller: 'StreamController' + }). + when('/:core/replication', { + templateUrl: 'partials/replication.html', + controller: 'ReplicationController' + }). + when('/:core/dataimport', { + templateUrl: 'partials/dataimport.html', + controller: 'DataImportController' + }). + when('/:core/dataimport/:handler*', { + templateUrl: 'partials/dataimport.html', + controller: 'DataImportController' + }). + when('/:core/schema', { + templateUrl: 'partials/schema.html', + controller: 'SchemaController' + }). + when('/:core/segments', { + templateUrl: 'partials/segments.html', + controller: 'SegmentsController' + }). + otherwise({ + redirectTo: '/' + }); +}]) +.constant('Constants', { + IS_ROOT_PAGE: 1, + IS_CORE_PAGE: 2, + IS_COLLECTION_PAGE: 3, + ROOT_URL: "/" +}) +.filter('uriencode', function() { + return window.encodeURIComponent; +}) +.filter('highlight', function($sce) { + return function(input, lang) { + if (lang && input && lang!="txt") return hljs.highlight(lang, input).value; + return input; + } +}) +.filter('unsafe', function($sce) { return $sce.trustAsHtml; }) +.directive('loadingStatusMessage', function() { + return { + link: function($scope, $element, attrs) { + var show = function() {$element.css('display', 'block')}; + var hide = function() {$element.css('display', 'none')}; + $scope.$on('loadingStatusActive', show); + $scope.$on('loadingStatusInactive', hide); + } + }; +}) +.directive('escapePressed', function () { + return function (scope, element, attrs) { + element.bind("keydown keypress", function (event) { + if(event.which === 27) { + scope.$apply(function (){ + scope.$eval(attrs.escapePressed); + }); + event.preventDefault(); + } + }); + }; +}) +.directive('focusWhen', function($timeout) { + return { + link: function(scope, element, attrs) { + scope.$watch(attrs.focusWhen, function(value) { + if(value === true) { + $timeout(function() { + element[0].focus(); + }, 100); + } + }); + } + }; +}) +.directive('scrollableWhenSmall', function($window) { + return { + link: function(scope, element, attrs) { + var w = angular.element($window); + + var checkFixedMenu = function() { + var shouldScroll = w.height() < (element.height() + $('#header').height() + 40); + element.toggleClass( 'scroll', shouldScroll); + }; + w.bind('resize', checkFixedMenu); + w.bind('load', checkFixedMenu); + } + } +}) +.filter('readableSeconds', function() { + return function(input) { + seconds = parseInt(input||0, 10); + var minutes = Math.floor( seconds / 60 ); + var hours = Math.floor( minutes / 60 ); + + var text = []; + if( 0 !== hours ) { + text.push( hours + 'h' ); + seconds -= hours * 60 * 60; + minutes -= hours * 60; + } + + if( 0 !== minutes ) { + text.push( minutes + 'm' ); + seconds -= minutes * 60; + } + + if( 0 !== seconds ) { + text.push( ( '0' + seconds ).substr( -2 ) + 's' ); + } + return text.join(' '); + }; +}) +.filter('number', function($locale) { + return function(input) { + var sep = { + 'de_CH' : '\'', + 'de' : '.', + 'en' : ',', + 'es' : '.', + 'it' : '.', + 'ja' : ',', + 'sv' : ' ', + 'tr' : '.', + '_' : '' // fallback + }; + + var browser = {}; + var match = $locale.id.match( /^(\w{2})([-_](\w{2}))?$/ ); + if (match[1]) { + browser.language = match[1].toLowerCase(); + } + if (match[1] && match[3]) { + browser.locale = match[1] + '_' + match[3]; + } + + return ( input || 0 ).toString().replace(/\B(?=(\d{3})+(?!\d))/g, + sep[ browser.locale ] || sep[ browser.language ] || sep['_']); + }; +}) +.filter('orderObjectBy', function() { + return function(items, field, reverse) { + var filtered = []; + angular.forEach(items, function(item) { + filtered.push(item); + }); + filtered.sort(function (a, b) { + return (a[field] > b[field] ? 1 : -1); + }); + if(reverse) filtered.reverse(); + return filtered; + }; +}) +.directive('jstree', function($parse) { + return { + restrict: 'EA', + scope: { + data: '=', + onSelect: '&' + }, + link: function(scope, element, attrs) { + scope.$watch("data", function(newValue, oldValue) { + if (newValue) { + var treeConfig = { + "plugins" : [ "themes", "json_data", "ui" ], + "json_data" : { + "data" : scope.data, + "progressive_render" : true + }, + "core" : { + "animation" : 0 + } + }; + + var tree = $(element).jstree(treeConfig); + tree.jstree('open_node','li:first'); + if (tree) { + element.bind("select_node.jstree", function (event, data) { + scope.$apply(function() { + scope.onSelect({url: data.args[0].href, data: data}); + }); + }); + } + } + }, true); + } + }; +}) +.directive('connectionMessage', function() { + return { + link: function($scope, $element, attrs) { + var show = function() {$element.css('display', 'block')}; + var hide = function() {$element.css('display', 'none')}; + $scope.$on('connectionStatusActive', show); + $scope.$on('connectionStatusInactive', hide); + } + }; +}) +.factory('httpInterceptor', function($q, $rootScope, $timeout, $injector) { + var activeRequests = 0; + + var started = function(config) { + if (activeRequests == 0) { + $rootScope.$broadcast('loadingStatusActive'); + } + if ($rootScope.exceptions[config.url]) { + delete $rootScope.exceptions[config.url]; + } + activeRequests++; + config.timeout = 10000; + return config || $q.when(config); + }; + + var ended = function(response) { + activeRequests--; + if (activeRequests == 0) { + $rootScope.$broadcast('loadingStatusInactive'); + } + if ($rootScope.retryCount>0) { + $rootScope.connectionRecovered = true; + $rootScope.retryCount=0; + $timeout(function() { + $rootScope.connectionRecovered=false; + $rootScope.$broadcast('connectionStatusInactive'); + },2000); + } + return response || $q.when(response); + }; + + var failed = function(rejection) { + activeRequests--; + if (activeRequests == 0) { + $rootScope.$broadcast('loadingStatusInactive'); + } + if (rejection.config.headers.doNotIntercept) { + return rejection; + } + if (rejection.status === 0) { + $rootScope.$broadcast('connectionStatusActive'); + if (!$rootScope.retryCount) $rootScope.retryCount=0; + $rootScope.retryCount ++; + var $http = $injector.get('$http'); + var result = $http(rejection.config); + return result; + } else { + $rootScope.exceptions[rejection.config.url] = rejection.data.error; + } + return $q.reject(rejection); + } + + return {request: started, response: ended, responseError: failed}; +}) +.config(function($httpProvider) { + $httpProvider.interceptors.push("httpInterceptor"); +}) +.directive('fileModel', function ($parse) { + return { + restrict: 'A', + link: function(scope, element, attrs) { + var model = $parse(attrs.fileModel); + var modelSetter = model.assign; + + element.bind('change', function(){ + scope.$apply(function(){ + modelSetter(scope, element[0].files[0]); + }); + }); + } + }; +}); + +solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $location, Cores, Collections, System, Ping, Constants) { + + $rootScope.exceptions={}; + + $rootScope.toggleException = function() { + $scope.showException=!$scope.showException; + }; + + $scope.refresh = function() { + $scope.cores = []; + $scope.collections = []; + } + + $scope.refresh(); + $scope.resetMenu = function(page, pageType) { + Cores.list(function(data) { + $scope.cores = []; + var currentCoreName = $route.current.params.core; + delete $scope.currentCore; + for (key in data.status) { + var core = data.status[key]; + $scope.cores.push(core); + if ((!$scope.isSolrCloud || pageType == Constants.IS_CORE_PAGE) && core.name == currentCoreName) { + $scope.currentCore = core; + } + } + $scope.showInitFailures = Object.keys(data.initFailures).length>0; + $scope.initFailures = data.initFailures; + }); + + System.get(function(data) { + $scope.isCloudEnabled = data.mode.match( /solrcloud/i ); + + if ($scope.isCloudEnabled) { + Collections.list(function (data) { + $scope.collections = []; + var currentCollectionName = $route.current.params.core; + delete $scope.currentCollection; + for (key in data.collections) { + var collection = {name: data.collections[key]}; + $scope.collections.push(collection); + if (pageType == Constants.IS_COLLECTION_PAGE && collection.name == currentCollectionName) { + $scope.currentCollection = collection; + } + } + }) + } + + }); + + $scope.showingLogging = page.lastIndexOf("logging", 0) === 0; + $scope.showingCloud = page.lastIndexOf("cloud", 0) === 0; + $scope.page = page; + }; + + $scope.ping = function() { + Ping.ping({core: $scope.currentCore.name}, function(data) { + $scope.showPing = true; + $scope.pingMS = data.responseHeader.QTime; + }); + // @todo .attr( 'title', '/admin/ping is not configured (' + xhr.status + ': ' + error_thrown + ')' ); + }; + + $scope.dumpCloud = function() { + $scope.$broadcast("cloud-dump"); + } + + $scope.showCore = function(core) { + $location.url("/" + core.name); + } + + $scope.showCollection = function(collection) { + $location.url("/" + collection.name + "/collection-overview") + } + + $scope.$on('$routeChangeStart', function() { + $rootScope.exceptions = {}; + }); +}); + + +(function(window, angular, undefined) { + 'use strict'; + + angular.module('ngClipboard', []). + provider('ngClip', function() { + var self = this; + this.path = '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.swf'; + return { + setPath: function(newPath) { + self.path = newPath; + }, + setConfig: function(config) { + self.config = config; + }, + $get: function() { + return { + path: self.path, + config: self.config + }; + } + }; + }). + run(['ngClip', function(ngClip) { + var config = { + swfPath: ngClip.path, + trustedDomains: ["*"], + allowScriptAccess: "always", + forceHandCursor: true, + }; + ZeroClipboard.config(angular.extend(config,ngClip.config || {})); + }]). + directive('clipCopy', ['ngClip', function (ngClip) { + return { + scope: { + clipCopy: '&', + clipClick: '&', + clipClickFallback: '&' + }, + restrict: 'A', + link: function (scope, element, attrs) { + // Bind a fallback function if flash is unavailable + if (ZeroClipboard.isFlashUnusable()) { + element.bind('click', function($event) { + // Execute the expression with local variables `$event` and `copy` + scope.$apply(scope.clipClickFallback({ + $event: $event, + copy: scope.$eval(scope.clipCopy) + })); + }); + + return; + } + + // Create the client object + var client = new ZeroClipboard(element); + if (attrs.clipCopy === "") { + scope.clipCopy = function(scope) { + return element[0].previousElementSibling.innerText; + }; + } + client.on( 'ready', function(readyEvent) { + + client.on('copy', function (event) { + var clipboard = event.clipboardData; + clipboard.setData(attrs.clipCopyMimeType || 'text/plain', scope.$eval(scope.clipCopy)); + }); + + client.on( 'aftercopy', function(event) { + if (angular.isDefined(attrs.clipClick)) { + scope.$apply(scope.clipClick); + } + }); + + scope.$on('$destroy', function() { + client.destroy(); + }); + }); + } + }; + }]); +})(window, window.angular); + + +/* THE BELOW CODE IS TAKEN FROM js/scripts/app.js, AND STILL REQUIRES INTEGRATING + + +// @todo clear timeouts + + // activate_core + this.before + ( + {}, + function( context ) + { + + var menu_wrapper = $( '#menu-wrapper' ); + + // global dashboard doesn't have params.splat + if( !this.params.splat ) + { + this.params.splat = [ '~index' ]; + } + + var selector = '~' === this.params.splat[0][0] + ? '#' + this.params.splat[0].replace( /^~/, '' ) + '.global' + : '#core-selector #' + this.params.splat[0].replace( /\./g, '__' ); + + var active_element = $( selector, menu_wrapper ); + + // @todo "There is no core with this name" + + if( active_element.hasClass( 'global' ) ) + { + active_element + .addClass( 'active' ); + + if( this.params.splat[1] ) + { + $( '.' + this.params.splat[1], active_element ) + .addClass( 'active' ); + } + + $( '#core-selector option[selected]' ) + .removeAttr( 'selected' ) + .trigger( 'liszt:updated' ); + + $( '#core-selector .chzn-container > a' ) + .addClass( 'chzn-default' ); + } + else + { + active_element + .attr( 'selected', 'selected' ) + .trigger( 'liszt:updated' ); + + + $( '#core-menu .' + this.params.splat[1] ) + .addClass( 'active' ); + + } + ); + } +); + +var solr_admin = function( app_config ) +{ + this.menu_element = $( '#core-selector select' ); + this.core_menu = $( '#core-menu ul' ); + + this.config = config; + this.timeout = null; + + this.core_regex_base = '^#\\/([\\w\\d-\\.]+)'; + + show_global_error = function( error ) + { + var main = $( '#main' ); + + $( 'div[id$="-wrapper"]', main ) + .remove(); + + main + .addClass( 'error' ) + .append( error ); + + var pre_tags = $( 'pre', main ); + if( 0 !== pre_tags.size() ) + { + hljs.highlightBlock( pre_tags.get(0) ); + } + }; + + sort_cores_data = function sort_cores_data( cores_status ) + { + // build array of core-names for sorting + var core_names = []; + for( var core_name in cores_status ) + { + core_names.push( core_name ); + } + core_names.sort(); + + var core_count = core_names.length; + var cores = {}; + + for( var i = 0; i < core_count; i++ ) + { + var core_name = core_names[i]; + cores[core_name] = cores_status[core_name]; + } + + return cores; + }; + + this.set_cores_data = function set_cores_data( cores ) + { + that.cores_data = sort_cores_data( cores.status ); + + that.menu_element + .empty(); + + var core_list = []; + core_list.push( '' ); + + var core_count = 0; + for( var core_name in that.cores_data ) + { + core_count++; + var core_path = config.solr_path + '/' + core_name; + var classes = []; + + if( cores.status[core_name]['isDefaultCore'] ) + { + classes.push( 'default' ); + } + + var core_tpl = ''; + + core_list.push( core_tpl ); + } + + var has_cores = 0 !== core_count; + if( has_cores ) + { + that.menu_element + .append( core_list.join( "\n" ) ) + .trigger( 'liszt:updated' ); + } + + var core_selector = $( '#core-selector' ); + + if( has_cores ) + { + var cores_element = core_selector.find( '#has-cores' ); + var selector_width = cores_element.width(); + + cores_element.find( '.chzn-container' ) + .css( 'width', selector_width + 'px' ); + + cores_element.find( '.chzn-drop' ) + .css( 'width', ( selector_width - 2 ) + 'px' ); + } + }; + + this.run = function() + { + $.ajax + ( + { + // load cores (indexInfo = false + success : function( response ) + { + + var system_url = config.solr_path + '/admin/info/system?wt=json'; + $.ajax + ( + { + url : system_url, + dataType : 'json', + beforeSend : function( arr, form, options ) + { + }, + success : function( response ) + { + that.dashboard_values = response; + + var environment_args = null; + var cloud_args = null; + + if( response.jvm && response.jvm.jmx && response.jvm.jmx.commandLineArgs ) + { + var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' ); + + environment_args = command_line_args.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i ); + } + +// @todo detect $scope.isCloud = response.mode.match( /solrcloud/i ); + + // environment + + var wrapper = $( '#wrapper' ); + var environment_element = $( '#environment' ); + if( environment_args ) + { + wrapper + .addClass( 'has-environment' ); + + if( environment_args[1] ) + { + environment_element + .html( environment_args[1] ); + } + + if( environment_args[2] ) + { + environment_element + .addClass( environment_args[2] ); + } + } + else + { + wrapper + .removeClass( 'has-environment' ); + } + + // cloud + + var cloud_nav_element = $( '#menu #cloud' ); + if( cloud_args ) + { + cloud_nav_element + .show(); + } + + // sammy + + sammy.run( location.hash ); + }, + error : function() + { + }; +*/ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/analysis.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/analysis.js new file mode 100644 index 0000000000..ccd556aa08 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/analysis.js @@ -0,0 +1,203 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +solrAdminApp.controller('AnalysisController', + function($scope, $location, $routeParams, Luke, Analysis, Constants) { + $scope.resetMenu("analysis", Constants.IS_COLLECTION_PAGE); + + $scope.refresh = function() { + Luke.schema({core: $routeParams.core}, function(data) { + $scope.fieldsAndTypes = []; + for (var field in data.schema.fields) { + $scope.fieldsAndTypes.push({ + group: "Fields", + value: "fieldname=" + field, + label: field}); + } + for (var type in data.schema.types) { + $scope.fieldsAndTypes.push({ + group: "Types", + value: "fieldtype=" + type, + label: type}); + } + $scope.core = $routeParams.core; + }); + + $scope.parseQueryString(); + // @todo - set defaultSearchField either to context["analysis.fieldname"] or context["analysis.fieldtype"] + + }; + $scope.verbose = true; + + var getShortComponentName = function(longname) { + var short = -1 !== longname.indexOf( '$' ) + ? longname.split( '$' )[1] + : longname.split( '.' ).pop(); + return short.match( /[A-Z]/g ).join( '' ); + }; + + var getCaptionsForComponent = function(data) { + var captions = []; + for (var key in data[0]) { + key = key.replace(/.*#/,''); + if (key != "match" && key!="positionHistory") { + captions.push(key.replace(/.*#/,'')); + } + } + return captions; + }; + + var getTokensForComponent = function(data) { + var tokens = []; + var previousPosition = 0; + var index=0; + for (var i in data) { + var tokenhash = data[i]; + var positionDifference = tokenhash.position - previousPosition; + for (var j=positionDifference; j>1; j--) { + tokens.push({position: tokenhash.position - j+1, blank:true, index:index++}); + } + + var token = {position: tokenhash.position, keys:[], index:index++}; + + for (key in tokenhash) { + if (key == "match" || key=="positionHistory") { + //@ todo do something + } else { + token.keys.push({name:key, value:tokenhash[key]}); + } + } + tokens.push(token); + previousPosition = tokenhash.position; + } + return tokens; + }; + + var extractComponents = function(data, result, name) { + if (data) { + result[name] = []; + for (var i = 0; i < data.length; i += 2) { + var component = { + name: data[i], + short: getShortComponentName(data[i]), + captions: getCaptionsForComponent(data[i + 1]), + tokens: getTokensForComponent(data[i + 1]) + }; + result[name].push(component); + } + } + }; + + var processAnalysisData = function(analysis, fieldOrType) { + var fieldname; + for (fieldname in analysis[fieldOrType]) {console.log(fieldname);break;} + var response = {}; + extractComponents(analysis[fieldOrType][fieldname].index, response, "index"); + extractComponents(analysis[fieldOrType][fieldname].query, response, "query"); + return response; + }; + + $scope.updateQueryString = function() { + + var parts = $scope.fieldOrType.split("="); + var fieldOrType = parts[0]; + var name = parts[1]; + + if ($scope.indexText) { + $location.search("analysis.fieldvalue", $scope.indexText); + } else if ($location.search()["analysis.fieldvalue"]) { + $location.search("analysis.fieldvalue", null); + } + if ($scope.queryText) { + $location.search("analysis.query", $scope.queryText); + } else if ($location.search()["analysis.query"]) { + $location.search("analysis.query", null); + } + + if (fieldOrType == "fieldname") { + $location.search("analysis.fieldname", name); + $location.search("analysis.fieldtype", null); + } else { + $location.search("analysis.fieldtype", name); + $location.search("analysis.fieldname", null); + } + $location.search("verbose_output", $scope.verbose ? "1" : "0"); + }; + + $scope.parseQueryString = function () { + var params = {}; + var search = $location.search(); + + if (Object.keys(search).length == 0) { + return; + } + for (var key in search) { + params[key]=search[key]; + } + $scope.indexText = search["analysis.fieldvalue"]; + $scope.queryText = search["analysis.query"]; + if (search["analysis.fieldname"]) { + $scope.fieldOrType = "fieldname=" + search["analysis.fieldname"]; + $scope.schemaBrowserUrl = "field=" + search["analysis.fieldname"]; + } else { + $scope.fieldOrType = "fieldtype=" + search["analysis.fieldtype"]; + $scope.schemaBrowserUrl = "type=" + search["analysis.fieldtype"]; + } + if (search["verbose_output"] == undefined) { + $scope.verbose = true; + } else { + $scope.verbose = search["verbose_output"] == "1"; + } + + if ($scope.fieldOrType || $scope.indexText || $scope.queryText) { + params.core = $routeParams.core; + var parts = $scope.fieldOrType.split("="); + var fieldOrType = parts[0] == "fieldname" ? "field_names" : "field_types"; + + Analysis.field(params, function(data) { + $scope.result = processAnalysisData(data.analysis, fieldOrType); + }); + } + }; + + $scope.changeFieldOrType = function() { + var parts = $scope.fieldOrType.split("="); + if (parts[0]=='fieldname') { + $scope.schemaBrowserUrl = "field=" + parts[1]; + } else { + $scope.schemaBrowserUrl = "type=" + parts[1]; + } + }; + + $scope.toggleVerbose = function() { + $scope.verbose = !$scope.verbose; + $scope.updateQueryString(); + }; + + $scope.refresh(); + } +); + +/*************** + +function(error) { + if (error.status == 404) { + $scope.isHandlerMissing = true; + } else { + $scope.analysisError = error.error.msg; + } +****/ \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/cloud.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/cloud.js new file mode 100644 index 0000000000..2d0dae0860 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/cloud.js @@ -0,0 +1,551 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +solrAdminApp.controller('CloudController', + function($scope, $location, Zookeeper, Constants) { + + $scope.showDebug = false; + + $scope.$on("cloud-dump", function(event) { + $scope.showDebug = true; + }); + + $scope.closeDebug = function() { + $scope.showDebug = false; + } + + var view = $location.search().view ? $location.search().view : "graph"; + if (view == "tree") { + $scope.resetMenu("cloud-tree", Constants.IS_ROOT_PAGE); + treeSubController($scope, Zookeeper); + } else if (view == "rgraph") { + $scope.resetMenu("cloud-rgraph", Constants.IS_ROOT_PAGE); + graphSubController($scope, Zookeeper, true); + } else if (view == "graph") { + $scope.resetMenu("cloud-graph", Constants.IS_ROOT_PAGE); + graphSubController($scope, Zookeeper, false); + } + } +); + +var treeSubController = function($scope, Zookeeper) { + $scope.showTree = true; + $scope.showGraph = false; + $scope.tree = {}; + $scope.showData = false; + + $scope.showTreeLink = function(link) { + var path = decodeURIComponent(link.replace(/.*[\\?&]path=([^&#]*).*/, "$1")); + Zookeeper.detail({path: path}, function(data) { + $scope.znode = data.znode; + var path = data.znode.path.split( '.' ); + if(path.length >1) { + $scope.lang = path.pop(); + } else { + var lastPathElement = data.znode.path.split( '/' ).pop(); + if (lastPathElement == "managed-schema") { + $scope.lang = "xml"; + } + } + $scope.showData = true; + }); + }; + + $scope.hideData = function() { + $scope.showData = false; + }; + + $scope.initTree = function() { + Zookeeper.simple(function(data) { + $scope.tree = data.tree; + }); + }; + + $scope.initTree(); +}; + +var graphSubController = function ($scope, Zookeeper, isRadial) { + $scope.showTree = false; + $scope.showGraph = true; + + $scope.filterType = "status"; + + $scope.helperData = { + protocol: [], + host: [], + hostname: [], + port: [], + pathname: [] + }; + + $scope.next = function() { + $scope.pos += $scope.rows; + $scope.initGraph(); + } + + $scope.previous = function() { + $scope.pos = Math.max(0, $scope.pos - $scope.rows); + $scope.initGraph(); + } + + $scope.resetGraph = function() { + $scope.pos = 0; + $scope.initGraph(); + } + + $scope.initGraph = function() { + Zookeeper.liveNodes(function (data) { + var live_nodes = {}; + for (var c in data.tree[0].children) { + live_nodes[data.tree[0].children[c].data.title] = true; + } + + var params = {view: "graph"}; + if ($scope.rows) { + params.start = $scope.pos; + params.rows = $scope.rows; + } + + var filter = ($scope.filterType=='status') ? $scope.pagingStatusFilter : $scope.pagingFilter; + + if (filter) { + params.filterType = $scope.filterType; + params.filter = filter; + } + + Zookeeper.clusterState(params, function (data) { + eval("var state=" + data.znode.data); // @todo fix horrid means to parse JSON + + var leaf_count = 0; + var graph_data = { + name: null, + children: [] + }; + + for (var c in state) { + var shards = []; + for (var s in state[c].shards) { + var nodes = []; + for (var n in state[c].shards[s].replicas) { + leaf_count++; + var replica = state[c].shards[s].replicas[n] + + var uri = replica.base_url; + var parts = uri.match(/^(\w+:)\/\/(([\w\d\.-]+)(:(\d+))?)(.+)$/); + var uri_parts = { + protocol: parts[1], + host: parts[2], + hostname: parts[3], + port: parseInt(parts[5] || 80, 10), + pathname: parts[6] + }; + + $scope.helperData.protocol.push(uri_parts.protocol); + $scope.helperData.host.push(uri_parts.host); + $scope.helperData.hostname.push(uri_parts.hostname); + $scope.helperData.port.push(uri_parts.port); + $scope.helperData.pathname.push(uri_parts.pathname); + + var status = replica.state; + + if (!live_nodes[replica.node_name]) { + status = 'gone'; + } + + var node = { + name: uri, + data: { + type: 'node', + state: status, + leader: 'true' === replica.leader, + uri: uri_parts + } + }; + nodes.push(node); + } + + var shard = { + name: s, + data: { + type: 'shard' + }, + children: nodes + }; + shards.push(shard); + } + + var collection = { + name: c, + data: { + type: 'collection' + }, + children: shards + }; + graph_data.children.push(collection); + } + + $scope.helperData.protocol = $.unique($scope.helperData.protocol); + $scope.helperData.host = $.unique($scope.helperData.host); + $scope.helperData.hostname = $.unique($scope.helperData.hostname); + $scope.helperData.port = $.unique($scope.helperData.port); + $scope.helperData.pathname = $.unique($scope.helperData.pathname); + + if (!isRadial && data.znode && data.znode.paging) { + $scope.showPaging = true; + + var parr = data.znode.paging.split('|'); + if (parr.length < 3) { + $scope.showPaging = false; + } else { + $scope.start = Math.max(parseInt(parr[0]), 0); + $scope.prevEnabled = ($scope.start > 0); + $scope.rows = parseInt(parr[1]); + $scope.total = parseInt(parr[2]); + + if ($scope.rows == -1) { + $scope.showPaging = false; + } else { + var filterType = parr.length > 3 ? parr[3] : ''; + + if (filterType == '' || filterType == 'none') filterType = 'status'; + + +$('#cloudGraphPagingFilterType').val(filterType); + + var filter = parr.length > 4 ? parr[4] : ''; + var page = Math.floor($scope.start / $scope.rows) + 1; + var pages = Math.ceil($scope.total / $scope.rows); + $scope.last = Math.min($scope.start + $scope.rows, $scope.total); + $scope.nextEnabled = ($scope.last < $scope.total); + } + } + } + else { + $scope.showPaging = false; + } + $scope.graphData = graph_data; + $scope.leafCount = leaf_count; + $scope.isRadial = isRadial; + }); + }); + }; + + $scope.initGraph(); +}; + +solrAdminApp.directive('graph', function(Constants) { + return { + restrict: 'EA', + scope: { + data: "=", + leafCount: "=", + helperData: "=", + isRadial: "=" + }, + link: function (scope, element, attrs) { + var helper_path_class = function (p) { + var classes = ['link']; + classes.push('lvl-' + p.target.depth); + + if (p.target.data && p.target.data.leader) { + classes.push('leader'); + } + + if (p.target.data && p.target.data.state) { + classes.push(p.target.data.state); + } + + return classes.join(' '); + }; + + var helper_node_class = function (d) { + var classes = ['node']; + classes.push('lvl-' + d.depth); + + if (d.data && d.data.leader) { + classes.push('leader'); + } + + if (d.data && d.data.state) { + classes.push(d.data.state); + } + + return classes.join(' '); + }; + + var helper_node_text = function (d) { + if (!d.data || !d.data.uri) { + return d.name; + } + + var name = d.data.uri.hostname; + + if (1 !== scope.helperData.protocol.length) { + name = d.data.uri.protocol + '//' + name; + } + + if (1 !== scope.helperData.port.length) { + name += ':' + d.data.uri.port; + } + + if (1 !== scope.helperData.pathname.length) { + name += d.data.uri.pathname; + } + + return name; + }; + + scope.$watch("data", function(newValue, oldValue) { + if (newValue) { + if (scope.isRadial) { + radialGraph(element, scope.data, scope.leafCount); + } else { + flatGraph(element, scope.data, scope.leafCount); + } + } + }); + + + function setNodeNavigationBehavior(node, view){ + node + .attr('data-href', function (d) { + if (d.type == "node"){ + return getNodeUrl(d, view); + } + else{ + return ""; + } + }) + .on('click', function(d) { + if (d.data.type == "node"){ + location.href = getNodeUrl(d, view); + } + }); + } + + function getNodeUrl(d, view){ + var url = d.name + Constants.ROOT_URL + "#/~cloud"; + if (view != undefined){ + url += "?view=" + view; + } + return url; + } + + var flatGraph = function(element, graphData, leafCount) { + var w = element.width(), + h = leafCount * 20; + + var tree = d3.layout.tree().size([h, w - 400]); + + var diagonal = d3.svg.diagonal().projection(function (d) { + return [d.y, d.x]; + }); + + d3.select('#canvas', element).html(''); + var vis = d3.select('#canvas', element).append('svg') + .attr('width', w) + .attr('height', h) + .append('g') + .attr('transform', 'translate(100, 0)'); + + var nodes = tree.nodes(graphData); + + var link = vis.selectAll('path.link') + .data(tree.links(nodes)) + .enter().append('path') + .attr('class', helper_path_class) + .attr('d', diagonal); + + var node = vis.selectAll('g.node') + .data(nodes) + .enter().append('g') + .attr('class', helper_node_class) + .attr('transform', function (d) { + return 'translate(' + d.y + ',' + d.x + ')'; + }) + + node.append('circle') + .attr('r', 4.5); + + node.append('text') + .attr('dx', function (d) { + return 0 === d.depth ? -8 : 8; + }) + .attr('dy', function (d) { + return 5; + }) + .attr('text-anchor', function (d) { + return 0 === d.depth ? 'end' : 'start'; + }) + .text(helper_node_text); + + setNodeNavigationBehavior(node); + }; + + var radialGraph = function(element, graphData, leafCount) { + var max_val = Math.min(element.width(), $('body').height()) + var r = max_val / 2; + + var cluster = d3.layout.cluster() + .size([360, r - 160]); + + var diagonal = d3.svg.diagonal.radial() + .projection(function (d) { + return [d.y, d.x / 180 * Math.PI]; + }); + + d3.select('#canvas', element).html(''); + var vis = d3.select('#canvas').append('svg') + .attr('width', r * 2) + .attr('height', r * 2) + .append('g') + .attr('transform', 'translate(' + r + ',' + r + ')'); + + var nodes = cluster.nodes(graphData); + + var link = vis.selectAll('path.link') + .data(cluster.links(nodes)) + .enter().append('path') + .attr('class', helper_path_class) + .attr('d', diagonal); + + var node = vis.selectAll('g.node') + .data(nodes) + .enter().append('g') + .attr('class', helper_node_class) + .attr('transform', function (d) { + return 'rotate(' + (d.x - 90) + ')translate(' + d.y + ')'; + }) + + node.append('circle') + .attr('r', 4.5); + + node.append('text') + .attr('dx', function (d) { + return d.x < 180 ? 8 : -8; + }) + .attr('dy', '.31em') + .attr('text-anchor', function (d) { + return d.x < 180 ? 'start' : 'end'; + }) + .attr('transform', function (d) { + return d.x < 180 ? null : 'rotate(180)'; + }) + .text(helper_node_text); + + setNodeNavigationBehavior(node, "rgraph"); + } + } + }; +}) + +/* + +======================== +var init_debug = function( cloud_element ) +{ + var debug_element = $( '#debug', cloud_element ); + var debug_button = $( '#menu #cloud .dump a' ); + + var clipboard_element = $( '.clipboard', debug_element ); + var clipboard_button = $( 'a', clipboard_element ); + + $( '.clipboard', debug_element ) + .die( 'click' ) + .live + ( + 'click', + function( event ) + { + return false; + } + ); + + url : app.config.solr_path + '/zookeeper?wt=json&dump=true', + ZeroClipboard.setMoviePath( 'img/ZeroClipboard.swf' ); + + clipboard_client = new ZeroClipboard.Client(); + + clipboard_client.addEventListener + ( + 'load', + function( client ) + { + } + ); + + clipboard_client.addEventListener + ( + 'complete', + function( client, text ) + { + clipboard_element + .addClass( 'copied' ); + + clipboard_button + .data( 'text', clipboard_button.text() ) + .text( clipboard_button.data( 'copied' ) ); + } + ); + }, + success : function( response, text_status, xhr ) + { + clipboard_client.glue + ( + clipboard_element.get(0), + clipboard_button.get(0) + ); + + clipboard_client.setText( response.replace( /\\/g, '\\\\' ) ); + + $( '.debug', debug_element ) + .removeClass( 'loader' ) + .text( response ); + }, + error : function( xhr, text_status, error_thrown ) + { + }, + complete : function( xhr, text_status ) + { + } + } + ); + } + ) + .die( 'hide' ) + .live + ( + 'hide', + function( event ) + { + $( '.debug', debug_element ) + .empty(); + + clipboard_element + .removeClass( 'copied' ); + + clipboard_button + .data( 'copied', clipboard_button.text() ) + .text( clipboard_button.data( 'text' ) ); + + clipboard_client.destroy(); + + debug_element.hide(); + } + ); +}; + +*/ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/collection-overview.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/collection-overview.js new file mode 100644 index 0000000000..d1834b2bd1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/collection-overview.js @@ -0,0 +1,39 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +solrAdminApp.controller('CollectionOverviewController', +function($scope, $routeParams, Collections, Constants) { + $scope.resetMenu("collection-overview", Constants.IS_COLLECTION_PAGE); + + $scope.refresh = function() { + Collections.status({}, function(data) { + $scope.selectedCollection = data.cluster.collections[$routeParams.core]; + $scope.selectedCollection.name = $routeParams.core; + $scope.rootUrl = Constants.ROOT_URL; + }); + }; + + $scope.showReplica = function(replica) { + replica.show = !replica.show; + } + + $scope.hideShard = function(shard) { + shard.hide = !shard.hide; + } + + $scope.refresh(); +}); diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/collections.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/collections.js new file mode 100644 index 0000000000..2bd6ab601b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/collections.js @@ -0,0 +1,260 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// @todo test optimize (delete stuff, watch button appear, test button/form) +solrAdminApp.controller('CollectionsController', + function($scope, $routeParams, $location, $timeout, Collections, Zookeeper, Constants){ + $scope.resetMenu("collections", Constants.IS_ROOT_PAGE); + + $scope.refresh = function() { + + $scope.rootUrl = Constants.ROOT_URL + "#/~collections/" + $routeParams.collection; + + Collections.status(function (data) { + $scope.collections = []; + for (var name in data.cluster.collections) { + var collection = data.cluster.collections[name]; + collection.name = name; + var shards = collection.shards; + collection.shards = []; + for (var shardName in shards) { + var shard = shards[shardName]; + shard.name = shardName; + shard.collection = collection.name; + var replicas = shard.replicas; + shard.replicas = []; + for (var replicaName in replicas) { + var replica = replicas[replicaName]; + replica.name = replicaName; + replica.collection = collection.name; + replica.shard = shard.name; + shard.replicas.push(replica); + } + collection.shards.push(shard); + } + $scope.collections.push(collection); + if ($routeParams.collection == name) { + $scope.collection = collection; + } + } + if ($routeParams.collection && !$scope.collection) { + alert("No collection called " + $routeParams.collection) + $location.path("/~collections"); + } + $scope.liveNodes = data.cluster.liveNodes; + }); + Zookeeper.configs(function(data) { + $scope.configs = []; + var items = data.tree[0].children; + for (var i in items) { + $scope.configs.push({name: items[i].data.title}); + } + }); + }; + + $scope.hideAll = function() { + $scope.showRename = false; + $scope.showAdd = false; + $scope.showDelete = false; + $scope.showSwap = false; + $scope.showCreateAlias = false; + $scope.showDeleteAlias = false; + }; + + $scope.showAddCollection = function() { + $scope.hideAll(); + $scope.showAdd = true; + $scope.newCollection = { + name: "", + routerName: "compositeId", + numShards: 1, + configName: "", + replicationFactor: 1, + maxShardsPerNode: 1 + }; + }; + + $scope.toggleCreateAlias = function() { + $scope.hideAll(); + $scope.showCreateAlias = true; + } + + $scope.toggleDeleteAlias = function() { + $scope.hideAll(); + $scope.showDeleteAlias = true; + Zookeeper.aliases({}, function(data){ + if (Object.keys(data.aliases).length == 0) { + delete $scope.aliases; + } else { + $scope.aliases = data.aliases; + } + }); + + } + + $scope.cancelCreateAlias = $scope.cancelDeleteAlias = function() { + $scope.hideAll(); + } + + $scope.createAlias = function() { + var collections = []; + for (var i in $scope.aliasCollections) { + collections.push($scope.aliasCollections[i].name); + } + Collections.createAlias({name: $scope.aliasToCreate, collections: collections.join(",")}, function(data) { + $scope.hideAll(); + }); + } + $scope.deleteAlias = function() { + Collections.deleteAlias({name: $scope.aliasToDelete}, function(data) { + $scope.hideAll(); + }); + + }; + $scope.addCollection = function() { + if (!$scope.newCollection.name) { + $scope.addMessage = "Please provide a core name"; + } else if (false) { //@todo detect whether core exists + $scope.AddMessage = "A core with that name already exists"; + } else { + var coll = $scope.newCollection; + var params = { + name: coll.name, + "router.name": coll.routerName, + numShards: coll.numShards, + "collection.configName": coll.configName, + replicationFactor: coll.replicationFactor, + maxShardsPerNode: coll.maxShardsPerNode + }; + if (coll.shards) params.shards = coll.shards; + if (coll.routerField) params.routerField = coll.routerField; + if (coll.routerName) params.routerName = coll.routerName; + Collections.add(params, function(data) { + $scope.cancelAddCollection(); + $scope.resetMenu("collections", Constants.IS_ROOT_PAGE); + $location.path("/~collections/" + $scope.newCollection.name); + }); + } + }; + + $scope.cancelAddCollection = function() { + delete $scope.addMessage; + $scope.showAdd = false; + }; + + $scope.showDeleteCollection = function() { + $scope.hideAll(); + if ($scope.collection) { + $scope.showDelete = true; + } else { + alert("No collection selected."); + } + }; + + $scope.deleteCollection = function() { + if ($scope.collection.name == $scope.collectionDeleteConfirm) { + Collections.delete({name: $scope.collection.name}, function (data) { + $location.path("/~collections"); + }); + } else { + $scope.deleteMessage = "Collection names do not match."; + } + }; + + $scope.reloadCollection = function() { + if (!$scope.collection) { + alert("No collection selected."); + return; + } + Collections.reload({name: $scope.collection.name}, + function(successData) { + $scope.reloadSuccess = true; + $timeout(function() {$scope.reloadSuccess=false}, 1000); + }, + function(failureData) { + $scope.reloadFailure = true; + $timeout(function() {$scope.reloadFailure=false}, 1000); + $location.path("/~collections"); + }); + }; + + $scope.toggleAddReplica = function(shard) { + $scope.hideAll(); + shard.showAdd = !shard.showAdd; + delete $scope.addReplicaMessage; + + Zookeeper.liveNodes({}, function(data) { + $scope.nodes = []; + var children = data.tree[0].children; + for (var child in children) { + $scope.nodes.push(children[child].data.title); + } + }); + }; + + $scope.toggleRemoveReplica = function(replica) { + $scope.hideAll(); + replica.showRemove = !replica.showRemove; + }; + + $scope.deleteReplica = function(replica) { + Collections.deleteReplica({collection: replica.collection, shard:replica.shard, replica:replica.name}, function(data) { + replica.deleted = true; + $timeout(function() { + $scope.refresh(); + }, 2000); + }); + } + $scope.addReplica = function(shard) { + var params = { + collection: shard.collection, + shard: shard.name, + } + if (shard.replicaNodeName && shard.replicaNodeName != "") { + params.node = shard.replicaNodeName; + } + Collections.addReplica(params, function(data) { + shard.replicaAdded = true; + $timeout(function () { + shard.replicaAdded = false; + shard.showAdd = false; + $$scope.refresh(); + }, 2000); + }); + }; + + $scope.toggleShard = function(shard) { + shard.show = !shard.show; + } + + $scope.toggleReplica = function(replica) { + replica.show = !replica.show; + } + + $scope.refresh(); + } +); + +var flatten = function(data) { + var list = []; + for (var name in data) { + var entry = data[name]; + entry.name = name; + list.push(entry); + } + return list; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/core-overview.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/core-overview.js new file mode 100644 index 0000000000..710e6f2426 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/core-overview.js @@ -0,0 +1,224 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +solrAdminApp.controller('CoreOverviewController', +function($scope, $rootScope, $routeParams, Luke, CoreSystem, Update, Replication, Ping, Constants) { + $scope.resetMenu("overview", Constants.IS_CORE_PAGE); + $scope.refreshIndex = function() { + Luke.index({core: $routeParams.core}, + function(data) { + $scope.index = data.index; + delete $scope.statsMessage; + }, + function(error) { + $scope.statsMessage = "Luke is not configured"; + } + ); + }; + + $scope.optimizeIndex = function(core) { + Update.optimize({core: $routeParams.core}, + function(response) { + $scope.refresh(); + delete $scope.indexMessage; + }, + function(error) { + $scope.statisticsDisabled = true; + $scope.indexMessage = "Optimize broken."; + }); + }; + + $scope.refreshReplication = function() { + Replication.details({core: $routeParams.core}, + function(data) { + $scope.isSlave = data.details.isSlave == "true"; + $scope.isMaster = data.details.isMaster == "true"; + $scope.replication = data.details; + }, + function(error) { + $scope.replicationMessage = "Replication is not configured"; + }); + /* + /replication?command=details&wt=json + + if( is_slave ) + { + + // warnings if slave version|gen doesn't match what's replicable + if( data.indexVersion !== master_data.master.replicableVersion ) + { + $( '.version', details_element ) + .addClass( 'diff' ); + } + else + { + $( '.version', details_element ) + .removeClass( 'diff' ); + } + + if( data.generation !== master_data.master.replicableGeneration ) + { + $( '.generation', details_element ) + .addClass( 'diff' ); + } + else + { + $( '.generation', details_element ) + .removeClass( 'diff' ); + } + } + }, + +*/ + }; + + $scope.refreshAdminExtra = function() { + }; + + $scope.refreshSystem = function() { + CoreSystem.get({core: $routeParams.core}, + function(data) { + $scope.core = data.core; + delete $scope.systemMessage; + }, + function(error) { + $scope.systemMessage = "/admin/system Handler is not configured"; + } + ); + }; + + $scope.refreshPing = function() { + Ping.status({core: $routeParams.core}, function(data) { + if (data.error) { + $scope.healthcheckStatus = false; + if (data.error.code == 503) { + $scope.healthcheckMessage = 'Ping request handler is not configured with a healthcheck file.'; + } + } else { + $scope.healthcheckStatus = data.status == "enabled"; + } + }); + }; + + $scope.toggleHealthcheck = function() { + if ($scope.healthcheckStatus) { + Ping.disable( + function(data) {$scope.healthcheckStatus = false}, + function(error) {$scope.healthcheckMessage = error} + ); + } else { + Ping.enable( + function(data) {$scope.healthcheckStatus = true}, + function(error) {$scope.healthcheckMessage = error} + ); + } + }; + + $scope.refresh = function() { + $scope.refreshIndex(); + $scope.refreshReplication(); + $scope.refreshAdminExtra(); + $scope.refreshSystem(); + $scope.refreshPing(); + }; + + $scope.refresh(); +}); + +/******* + +// @todo admin-extra + var core_basepath = this.active_core.attr( 'data-basepath' ); + var content_element = $( '#content' ); + + content_element + .removeClass( 'single' ); + + if( !app.core_menu.data( 'admin-extra-loaded' ) ) + { + app.core_menu.data( 'admin-extra-loaded', new Date() ); + + $.get + ( + core_basepath + '/admin/file/?file=admin-extra.menu-top.html&contentType=text/html;charset=utf-8', + function( menu_extra ) + { + app.core_menu + .prepend( menu_extra ); + } + ); + + $.get + ( + core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html&contentType=text/html;charset=utf-8', + function( menu_extra ) + { + app.core_menu + .append( menu_extra ); + } + ); + } + + + +////////////////////////////////// ADMIN EXTRA + $.ajax + ( + { + url : core_basepath + '/admin/file/?file=admin-extra.html', + dataType : 'html', + context : $( '#admin-extra', dashboard_element ), + beforeSend : function( xhr, settings ) + { + $( 'h2', this ) + .addClass( 'loader' ); + + $( '.message', this ) + .show() + .html( 'Loading' ); + + $( '.content', this ) + .hide(); + }, + success : function( response, text_status, xhr ) + { + $( '.message', this ) + .hide() + .empty(); + + $( '.content', this ) + .show() + .html( response ); + }, + error : function( xhr, text_status, error_thrown) + { + this + .addClass( 'disabled' ); + + $( '.message', this ) + .show() + .html( 'We found no "admin-extra.html" file.' ); + }, + complete : function( xhr, text_status ) + { + $( 'h2', this ) + .removeClass( 'loader' ); + } + } + ); + +***/ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/cores.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/cores.js new file mode 100644 index 0000000000..d135395d8f --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/cores.js @@ -0,0 +1,478 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// @todo test optimize (delete stuff, watch button appear, test button/form) +solrAdminApp.controller('CoreAdminController', + function($scope, $routeParams, $location, $timeout, $route, Cores, Update, Constants){ + $scope.resetMenu("cores", Constants.IS_ROOT_PAGE); + $scope.selectedCore = $routeParams.corename; // use 'corename' not 'core' to distinguish from /solr/:core/ + $scope.refresh = function() { + Cores.get(function(data) { + var coreCount = 0; + var cores = data.status; + for (_obj in cores) coreCount++; + $scope.hasCores = coreCount >0; + if (!$scope.selectedCore && coreCount==0) { + $scope.showAddCore(); + return; + } else if (!$scope.selectedCore) { + for (firstCore in cores) break; + $scope.selectedCore = firstCore; + $location.path("/~cores/" + $scope.selectedCore).replace(); + } + $scope.core = cores[$scope.selectedCore]; + $scope.corelist = []; + $scope.swapCorelist = []; + for (var core in cores) { + $scope.corelist.push(cores[core]); + if (cores[core] != $scope.core) { + $scope.swapCorelist.push(cores[core]); + } + } + if ($scope.swapCorelist.length>0) { + $scope.swapOther = $scope.swapCorelist[0].name; + } + }); + }; + $scope.showAddCore = function() { + $scope.hideAll(); + $scope.showAdd = true; + $scope.newCore = { + name: "new_core", + dataDir: "data", + instanceDir: "new_core", + config: "solrconfig.xml", + schema: "schema.xml", + collection: "", + shard: "" + }; + }; + + $scope.addCore = function() { + if (!$scope.newCore.name) { + $scope.addMessage = "Please provide a core name"; + } else if (false) { //@todo detect whether core exists + $scope.AddMessage = "A core with that name already exists"; + } else { + var params = { + name: $scope.newCore.name, + instanceDir: $scope.newCore.instanceDir, + config: $scope.newCore.config, + schema: $scope.newCore.schema, + dataDir: $scope.newCore.dataDir + }; + if ($scope.isCloud) { + params.collection = $scope.newCore.collection; + params.shard = $scope.newCore.shard; + } + Cores.add(params, function(data) { + $location.path("/~cores/" + $scope.newCore.name); + $scope.cancelAddCore(); + }); + } + }; + + $scope.cancelAddCore = function() { + delete $scope.addMessage; + $scope.showAdd = false + }; + + $scope.unloadCore = function() { + var answer = confirm( 'Do you really want to unload Core "' + $scope.selectedCore + '"?' ); + if( !answer ) return; + Cores.unload({core: $scope.selectedCore}, function(data) { + $location.path("/~cores"); + }); + }; + + $scope.showRenameCore = function() { + $scope.hideAll(); + $scope.showRename = true; + }; + + $scope.renameCore = function() { + if (!$scope.other) { + $scope.renameMessage = "Please provide a new name for the " + $scope.selectedCore + " core"; + } else if ($scope.other == $scope.selectedCore) { + $scope.renameMessage = "New name must be different from the current one"; + } else { + Cores.rename({core:$scope.selectedCore, other: $scope.other}, function(data) { + $location.path("/~cores/" + $scope.other); + $scope.cancelRename(); + }); + } + }; + + $scope.cancelRenameCore = function() { + $scope.showRename = false; + delete $scope.renameMessage; + $scope.other = ""; + }; + + $scope.showSwapCores = function() { + $scope.hideAll(); + $scope.showSwap = true; + }; + + $scope.swapCores = function() { + if (!$scope.swapOther) { + $scope.swapMessage = "Please select a core to swap with"; + } else if ($scope.swapOther == $scope.selectedCore) { + $scope.swapMessage = "Cannot swap with the same core"; + } else { + Cores.swap({core: $scope.selectedCore, other: $scope.swapOther}, function(data) { + $location.path("/~cores/" + $scope.swapOther); + delete $scope.swapOther; + $scope.cancelSwapCores(); + }); + } + }; + + $scope.cancelSwapCores = function() { + delete $scope.swapMessage; + $scope.showSwap = false; + } + + $scope.reloadCore = function() { + if ($scope.initFailures[$scope.selectedCore]) { + delete $scope.initFailures[$scope.selectedCore]; + $scope.showInitFailures = Object.keys(data.initFailures).length>0; + } + Cores.reload({core: $scope.selectedCore}, + function(data) { + if (data.error) { + $scope.reloadFailure = true; + $timeout(function() { + $scope.reloadFailure = false; + $route.reload(); + }, 1000); + } else { + $scope.reloadSuccess = true; + $timeout(function () { + $scope.reloadSuccess = false; + $route.reload(); + }, 1000); + } + }); + }; + + $scope.hideAll = function() { + $scope.showRename = false; + $scope.showAdd = false; + $scope.showSwap = false; + }; + + $scope.optimizeCore = function() { + Update.optimize({core: $scope.selectedCore}, + function(successData) { + $scope.optimizeSuccess = true; + $timeout(function() {$scope.optimizeSuccess=false}, 1000); + $scope.refresh(); + }, + function(failureData) { + $scope.optimizeFailure = true; + $timeout(function () {$scope.optimizeFailure=false}, 1000); + $scope.refresh(); + }); + }; + + $scope.refresh(); + } +); + +/************** + 'cores_load_data', + function( event, params ) + { + $.ajax + ( + { + url : app.config.solr_path + app.config.core_admin_path + '?wt=json', + dataType : 'json', + success : function( response, text_status, xhr ) + { + if( params.only_failures ) + { + app.check_for_init_failures( response ); + return true; + } + + +=========== NO CORES + error : function() + { + sammy.trigger + ( + 'cores_load_template', + { + content_element : content_element, + callback : function() + { + var cores_element = $( '#cores', content_element ); + var navigation_element = $( '#navigation', cores_element ); + var data_element = $( '#data', cores_element ); + var core_data_element = $( '#core-data', data_element ); + var index_data_element = $( '#index-data', data_element ); + + // layout + + var ui_block = $( '#ui-block' ); + var actions_element = $( '.actions', cores_element ); + var div_action = $( 'div.action', actions_element ); + + ui_block + .css( 'opacity', 0.7 ) + .width( cores_element.width() + 10 ) + .height( cores_element.height() ); + + if( $( '#cloud.global' ).is( ':visible' ) ) + { + $( '.cloud', div_action ) + .show(); + } + + $( 'button.action', actions_element ) + .die( 'click' ) + .live + ( + 'click', + function( event ) + { + var self = $( this ); + + self + .toggleClass( 'open' ); + + $( '.action.' + self.attr( 'id' ), actions_element ) + .trigger( 'open' ); + + return false; + } + ); + + div_action + .die( 'close' ) + .live + ( + 'close', + function( event ) + { + div_action.hide(); + ui_block.hide(); + } + ) + .die( 'open' ) + .live + ( + 'open', + function( event ) + { + var self = $( this ); + var rel = $( '#' + self.data( 'rel' ) ); + + self + .trigger( 'close' ) + .show() + .css( 'left', rel.position().left ); + + ui_block + .show(); + } + ); + + $( 'form button.reset', actions_element ) + .die( 'click' ) + .live + ( + 'click', + function( event ) + { + $( this ).closest( 'div.action' ) + .trigger( 'close' ); + } + ); + + $( 'form', div_action ) + .ajaxForm + ( + { + url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false', + dataType : 'json', + beforeSubmit : function( array, form, options ) + { + $( 'button[type="submit"] span', form ) + .addClass( 'loader' ); + }, + success : function( response, status_text, xhr, form ) + { + delete app.cores_data; + sammy.refresh(); + + $( 'button.reset', form ) + .trigger( 'click' ); + }, + error : function( xhr, text_status, error_thrown ) + { + var response = null; + eval( 'response = ' + xhr.responseText + ';' ); + + var error_elem = $( '.error', div_action.filter( ':visible' ) ); + error_elem.show(); + $( 'span', error_elem ).text( response.error.msg ); + }, + complete : function() + { + $( 'button span.loader', actions_element ) + .removeClass( 'loader' ); + } + } + ); + + // -- + + $( '#add', content_element ) + .trigger( 'click' ); + + $( '[data-rel="add"] input[type="text"]:first', content_element ) + .focus(); + } + } + ); + } + } + ); + } +); + +// #/~cores +sammy.get +( + /^#\/(~cores)\//, + function( context ) + { + var content_element = $( '#content' ); + + var path_parts = this.path.match( /^(.+\/~cores\/)(.*)$/ ); + var current_core = path_parts[2]; + + sammy.trigger + ( + 'cores_load_data', + { + error : function() + { + context.redirect( '#/' + context.params.splat[0] ); + }, + success : function( cores ) + { + sammy.trigger + ( + 'cores_load_template', + { + content_element : content_element, + callback : function() + { + var cores_element = $( '#cores', content_element ); + var navigation_element = $( '#navigation', cores_element ); + var data_element = $( '#data', cores_element ); + var core_data_element = $( '#core-data', data_element ); + var index_data_element = $( '#index-data', data_element ); + + cores_element + .removeClass( 'empty' ); + + var core_data = cores[current_core]; + var core_basepath = $( '#' + current_core, app.menu_element ).attr( 'data-basepath' ); + + var core_names = []; + var core_selects = $( '#actions select', cores_element ); + + $( 'option[value="' + current_core + '"]', core_selects.filter( '.other' ) ) + .remove(); + + $( 'input[data-core="current"]', cores_element ) + .val( current_core ); + + // layout + + var ui_block = $( '#ui-block' ); + var actions_element = $( '.actions', cores_element ); + var div_action = $( 'div.action', actions_element ); + + ui_block + .css( 'opacity', 0.7 ) + .width( cores_element.width() + 10 ) + .height( cores_element.height() ); + + if( $( '#cloud.global' ).is( ':visible' ) ) + { + $( '.cloud', div_action ) + .show(); + } + + var form_callback = { + + rename : function( form, response ) + { + var url = path_parts[1] + $( 'input[name="other"]', form ).val(); + context.redirect( url ); + } + + }; + + $( 'form', div_action ) + .ajaxForm + ( + { + url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false', + success : function( response, status_text, xhr, form ) + { + var action = $( 'input[name="action"]', form ).val().toLowerCase(); + + delete app.cores_data; + + if( form_callback[action] ) + { + form_callback[action]( form, response ); + } + else + { + sammy.refresh(); + } + + $( 'button.reset', form ) + .trigger( 'click' ); + }, + ); + + $( '#actions #unload', cores_element ) + var ret = confirm( 'Do you really want to unload Core "' + current_core + '"?' ); + if( !ret ) + return false; + + url : app.config.solr_path + app.config.core_admin_path + '?wt=json&action=UNLOAD&core=' + current_core, + success : function( response, text_status, xhr ) + { + delete app.cores_data; + context.redirect( path_parts[1].substr( 0, path_parts[1].length - 1 ) ); + }, + + optimize_button + url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json', + success : function( response, text_status, xhr ) + +******/ diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/dataimport.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/dataimport.js new file mode 100644 index 0000000000..d8fbc4fea1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/dataimport.js @@ -0,0 +1,303 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +var dataimport_timeout = 2000; + +solrAdminApp.controller('DataImportController', + function($scope, $rootScope, $routeParams, $location, $timeout, $interval, $cookies, Mbeans, DataImport, Constants) { + $scope.resetMenu("dataimport", Constants.IS_COLLECTION_PAGE); + + $scope.refresh = function () { + Mbeans.info({core: $routeParams.core, cat: 'QUERYHANDLER'}, function (data) { + var mbeans = data['solr-mbeans'][1]; + $scope.handlers = []; + for (var key in mbeans) { + if (mbeans[key]['class'] !== key && mbeans[key]['class'] === 'org.apache.solr.handler.dataimport.DataImportHandler') { + $scope.handlers.push(key); + } + } + $scope.hasHandlers = $scope.handlers.length > 0; + + if (!$routeParams.handler) { + $location.path("/" + $routeParams.core + "/dataimport/" + $scope.handlers[0]); + } else { + $scope.currentHandler = $routeParams.handler; + } + }); + + $scope.handler = $routeParams.handler; + if ($scope.handler && $scope.handler[0]=="/") { + $scope.handler = $scope.handler.substr(1); + } + if ($scope.handler) { + DataImport.config({core: $routeParams.core, name: $scope.handler}, function (data) { + try { + $scope.config = data.config; + var xml = $.parseXML(data.config); + $scope.entities = []; + $('document > entity', xml).each(function (i, element) { + $scope.entities.push($(element).attr('name')); + }); + $scope.refreshStatus(); + } catch (err) { + console.log(err); + } + }); + } + $scope.lastUpdate = "unknown"; + $scope.lastUpdateUTC = ""; + }; + + $scope.toggleDebug = function () { + $scope.isDebugMode = !$scope.isDebugMode; + if ($scope.isDebugMode) { + // also enable Debug checkbox + $scope.form.showDebug = true; + } + $scope.showConfiguration = true; + } + + $scope.toggleConfiguration = function () { + $scope.showConfiguration = !$scope.showConfiguration; + } + + $scope.toggleRawStatus = function () { + $scope.showRawStatus = !$scope.showRawStatus; + } + + $scope.toggleRawDebug = function () { + $scope.showRawDebug = !$scope.showRawDebug; + } + + $scope.reload = function () { + DataImport.reload({core: $routeParams.core, name: $scope.handler}, function () { + $scope.reloaded = true; + $timeout(function () { + $scope.reloaded = false; + }, 5000); + $scope.refresh(); + }); + } + + $scope.form = { + command: "full-import", + verbose: false, + clean: true, + commit: true, + optimize: false, + showDebug: false, + custom: "", + core: $routeParams.core + }; + + $scope.submit = function () { + var params = {}; + for (var key in $scope.form) { + if (key == "showDebug") { + if ($scope.form.showDebug) { + params["debug"] = true; + } + } else { + params[key] = $scope.form[key]; + } + } + if (params.custom.length) { + var customParams = $scope.form.custom.split("&"); + for (var i in customParams) { + var parts = customParams[i].split("="); + params[parts[0]] = parts[1]; + } + } + delete params.custom; + + if ($scope.isDebugMode) { + params.dataConfig = $scope.config; + } + + params.core = $routeParams.core; + params.name = $scope.handler; + + DataImport.post(params, function (data) { + $scope.rawResponse = JSON.stringify(data, null, 2); + $scope.refreshStatus(); + }); + }; + + $scope.abort = function () { + $scope.isAborting = true; + DataImport.abort({core: $routeParams.core, name: $scope.handler}, function () { + $timeout(function () { + $scope.isAborting = false; + $scope.refreshStatus(); + }, 4000); + }); + } + + $scope.refreshStatus = function () { + + console.log("Refresh Status"); + + $scope.isStatusLoading = true; + DataImport.status({core: $routeParams.core, name: $scope.handler}, function (data) { + if (data[0] == "<") { + $scope.hasHandlers = false; + return; + } + + var now = new Date(); + $scope.lastUpdate = now.toTimeString().split(' ').shift(); + $scope.lastUpdateUTC = now.toUTCString(); + var messages = data.statusMessages; + var messagesCount = 0; + for( var key in messages ) { messagesCount++; } + + if (data.status == 'busy') { + $scope.status = "indexing"; + + $scope.timeElapsed = data.statusMessages['Time Elapsed']; + $scope.elapsedSeconds = parseSeconds($scope.timeElapsed); + + var info = $scope.timeElapsed ? 'Indexing since ' + $scope.timeElapsed : 'Indexing ...'; + $scope.info = showInfo(messages, true, info, $scope.elapsedSeconds); + + } else if (messages.RolledBack) { + $scope.status = "failure"; + $scope.info = showInfo(messages, true); + } else if (messages.Aborted) { + $scope.status = "aborted"; + $scope.info = showInfo(messages, true, 'Aborting current Import ...'); + } else if (data.status == "idle" && messagesCount != 0) { + $scope.status = "success"; + $scope.info = showInfo(messages, true); + } else { + $scope.status = "idle"; + $scope.info = showInfo(messages, false, 'No information available (idle)'); + } + + delete data.$promise; + delete data.$resolved; + + $scope.rawStatus = JSON.stringify(data, null, 2); + + $scope.isStatusLoading = false; + $scope.statusUpdated = true; + $timeout(function () { + $scope.statusUpdated = false; + }, dataimport_timeout / 2); + }); + }; + + $scope.updateAutoRefresh = function () { + $scope.autorefresh = !$scope.autorefresh; + $cookies.dataimport_autorefresh = $scope.autorefresh ? true : null; + if ($scope.autorefresh) { + $scope.refreshTimeout = $interval($scope.refreshStatus, dataimport_timeout); + var onRouteChangeOff = $scope.$on('$routeChangeStart', function() { + $interval.cancel($scope.refreshTimeout); + onRouteChangeOff(); + }); + + } else if ($scope.refreshTimeout) { + $interval.cancel($scope.refreshTimeout); + } + $scope.refreshStatus(); + }; + + $scope.refresh(); + +}); + +var showInfo = function (messages, showFull, info_text, elapsed_seconds) { + + var info = {}; + if (info_text) { + info.text = info_text; + } else { + info.text = messages[''] || ''; + // format numbers included in status nicely + /* @todo this pretty printing is hard to work out how to do in an Angularesque way: + info.text = info.text.replace(/\d{4,}/g, + function (match, position, string) { + return app.format_number(parseInt(match, 10)); + } + ); + */ + + var time_taken_text = messages['Time taken']; + info.timeTaken = parseSeconds(time_taken_text); + } + info.showDetails = false; + + if (showFull) { + if (!elapsed_seconds) { + var time_taken_text = messages['Time taken']; + elapsed_seconds = parseSeconds(time_taken_text); + } + + info.showDetails = true; + + var document_config = { + 'Requests': 'Total Requests made to DataSource', + 'Fetched': 'Total Rows Fetched', + 'Skipped': 'Total Documents Skipped', + 'Processed': 'Total Documents Processed' + }; + + info.docs = []; + for (var key in document_config) { + var value = parseInt(messages[document_config[key]], 10); + var doc = {desc: document_config[key], name: key, value: value}; + if (elapsed_seconds && key != 'Skipped') { + doc.speed = Math.round(value / elapsed_seconds); + } + info.docs.push(doc); + } + + var dates_config = { + 'Started': 'Full Dump Started', + 'Aborted': 'Aborted', + 'Rolledback': 'Rolledback' + }; + + info.dates = []; + for (var key in dates_config) { + var value = messages[dates_config[key]]; + if (value) { + value = value.replace(" ", "T")+".000Z"; + console.log(value); + var date = {desc: dates_config[key], name: key, value: value}; + info.dates.push(date); + } + } + } + return info; +} + +var parseSeconds = function(time) { + var seconds = 0; + var arr = new String(time || '').split('.'); + var parts = arr[0].split(':').reverse(); + + for (var i = 0; i < parts.length; i++) { + seconds += ( parseInt(parts[i], 10) || 0 ) * Math.pow(60, i); + } + + if (arr[1] && 5 <= parseInt(arr[1][0], 10)) { + seconds++; // treat more or equal than .5 as additional second + } + return seconds; +} diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/documents.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/documents.js new file mode 100644 index 0000000000..be37c9fbde --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/documents.js @@ -0,0 +1,139 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ +//helper for formatting JSON and others + +var DOC_PLACEHOLDER = '\n' + + 'change.me' + + 'change.me' + + ''; + +var ADD_PLACEHOLDER = '\n' + DOC_PLACEHOLDER + '\n'; + +solrAdminApp.controller('DocumentsController', + function($scope, $rootScope, $routeParams, $location, Luke, Update, FileUpload, Constants) { + $scope.resetMenu("documents", Constants.IS_COLLECTION_PAGE); + + $scope.refresh = function () { + Luke.schema({core: $routeParams.core}, function(data) { + //TODO: handle dynamic fields + delete data.schema.fields._version_; + $scope.fields = Object.keys(data.schema.fields); + }); + $scope.document = ""; + $scope.handler = "/update"; + $scope.type = "json"; + $scope.commitWithin = 1000; + $scope.overwrite = true; + $scope.boost = "1.0"; + }; + + $scope.refresh(); + + $scope.changeDocumentType = function () { + $scope.placeholder = ""; + if ($scope.type == 'json') { + $scope.placeholder = '{"id":"change.me","title":"change.me"}'; + } else if ($scope.type == 'csv') { + $scope.placeholder = "id,title\nchange.me,change.me"; + } else if ($scope.type == 'solr') { + $scope.placeholder = ADD_PLACEHOLDER; + } else if ($scope.type == 'xml') { + $scope.placeholder = DOC_PLACEHOLDER; + } + }; + + $scope.addWizardField = function () { + if ($scope.document == "") $scope.document = "{}"; + var doc = JSON.parse($scope.document); + doc[$scope.fieldName] = $scope.fieldData; + $scope.document = JSON.stringify(doc, null, '\t'); + $scope.fieldData = ""; + }; + + $scope.submit = function () { + var contentType = ""; + var postData = ""; + var params = {}; + var doingFileUpload = false; + + if ($scope.handler[0] == '/') { + params.handler = $scope.handler.substring(1); + } else { + params.handler = 'update'; + params.qt = $scope.handler; + } + + params.commitWithin = $scope.commitWithin; + params.boost = $scope.boost; + params.overwrite = $scope.overwrite; + params.core = $routeParams.core; + params.wt = "json"; + + if ($scope.type == "json" || $scope.type == "wizard") { + postData = "[" + $scope.document + "]"; + contentType = "json"; + } else if ($scope.type == "csv") { + postData = $scope.document; + contentType = "csv"; + } else if ($scope.type == "xml") { + postData = "" + $scope.document + ""; + contentType = "xml"; + } else if ($scope.type == "upload") { + doingFileUpload = true; + params.raw = $scope.literalParams; + } else if ($scope.type == "solr") { + postData = $scope.document; + if (postData[0] == "<") { + contentType = "xml"; + } else if (postData[0] == "{" || postData[0] == '[') { + contentType = "json"; + } else { + alert("Cannot identify content type") + } + } + if (!doingFileUpload) { + var callback = function (success) { + $scope.responseStatus = "success"; + delete success.$promise; + delete success.$resolved; + $scope.response = JSON.stringify(success, null, ' '); + }; + var failure = function (failure) { + $scope.responseStatus = failure; + }; + if (contentType == "json") { + Update.postJson(params, postData, callback, failure); + } else if (contentType == "xml") { + Update.postXml(params, postData, callback, failure); + } else if (contentType == "csv") { + Update.postCsv(params, postData, callback, failure); + } + } else { + var file = $scope.fileUpload; + console.log('file is ' + JSON.stringify(file)); + var uploadUrl = "/fileUpload"; + FileUpload.upload(params, $scope.fileUpload, function (success) { + $scope.responseStatus = "success"; + $scope.response = JSON.stringify(success, null, ' '); + }, function (failure) { + $scope.responseStatus = "failure"; + $scope.response = JSON.stringify(failure, null, ' '); + }); + } + } + }); + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/files.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/files.js new file mode 100644 index 0000000000..00ea4b19ff --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/angular/controllers/files.js @@ -0,0 +1,100 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +var contentTypeMap = { xml : 'text/xml', html : 'text/html', js : 'text/javascript', json : 'application/json', 'css' : 'text/css' }; +var languages = {js: "javascript", xml:"xml", xsl:"xml", vm: "xml", html: "xml", json: "json", css: "css"}; + +solrAdminApp.controller('FilesController', + function($scope, $rootScope, $routeParams, $location, Files, Constants) { + $scope.resetMenu("files", Constants.IS_COLLECTION_PAGE); + + $scope.file = $location.search().file; + $scope.content = null; + + $scope.baseurl = $location.protocol()+ "://" + $location.host() + ":" + $location.port(); + + $scope.refresh = function () { + + var process = function (path, tree) { + var params = {core: $routeParams.core}; + if (path.slice(-1) == '/') { + params.file = path.slice(0, -1); + } else if (path!='') { + params.file = path; + } + + Files.list(params, function (data) { + var filenames = Object.keys(data.files); + filenames.sort(); + for (var i in filenames) { + var file = filenames[i]; + var filedata = data.files[file]; + var state = undefined; + var children = undefined; + + if (filedata.directory) { + file = file + "/"; + if ($scope.file && $scope.file.indexOf(path + file) == 0) { + state = "open"; + } else { + state = "closed"; + } + children = []; + process(path + file, children); + } + tree.push({ + data: { + title: file, + attr: { id: path + file} + }, + children: children, + state: state + }); + } + }); + } + $scope.tree = []; + process("", $scope.tree); + + if ($scope.file && $scope.file != '' && $scope.file.split('').pop()!='/') { + var extension; + if ($scope.file == "managed-schema") { + extension = contentTypeMap['xml']; + } else { + extension = $scope.file.match( /\.(\w+)$/)[1] || ''; + } + var contentType = (contentTypeMap[extension] || 'text/plain' ) + ';charset=utf-8'; + + Files.get({core: $routeParams.core, file: $scope.file, contentType: contentType}, function(data) { + $scope.content = data.data; + $scope.url = $scope.baseurl + data.config.url + "?" + $.param(data.config.params); + if (contentType.indexOf("text/plain") && (data.data.indexOf("=0) || data.data.indexOf("",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.php=function(a){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var b=[a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[a.BE]},{cN:"string",b:"b'",e:"'",c:[a.BE]}];var c=[a.BNM,a.CNM];var d={cN:"title",b:a.UIR};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler",c:[a.CLCM,a.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",eB:true,b:"__halt_compiler.+?;",eW:true},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[a.BE]},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"},e,{cN:"function",bWK:true,e:"{",k:"function",i:"\\$|\\[|%",c:[d,{cN:"params",b:"\\(",e:"\\)",c:["self",e,a.CBLCLM].concat(b).concat(c)}]},{cN:"class",bWK:true,e:"{",k:"class",i:"[:\\(\\$]",c:[{bWK:true,eW:true,k:"extends",c:[d]},d]},{b:"=>"}].concat(b).concat(c)}}(hljs);hljs.LANGUAGES.python=function(a){var f={cN:"prompt",b:"^(>>>|\\.\\.\\.) "};var c=[{cN:"string",b:"(u|b)?r?'''",e:"'''",c:[f],r:10},{cN:"string",b:'(u|b)?r?"""',e:'"""',c:[f],r:10},{cN:"string",b:"(u|r|ur)'",e:"'",c:[a.BE],r:10},{cN:"string",b:'(u|r|ur)"',e:'"',c:[a.BE],r:10},{cN:"string",b:"(b|br)'",e:"'",c:[a.BE]},{cN:"string",b:'(b|br)"',e:'"',c:[a.BE]}].concat([a.ASM,a.QSM]);var e={cN:"title",b:a.UIR};var d={cN:"params",b:"\\(",e:"\\)",c:["self",a.CNM,f].concat(c)};var b={bWK:true,e:":",i:"[${=;\\n]",c:[e,d],r:10};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10",built_in:"None True False Ellipsis NotImplemented"},i:"(|\\?)",c:c.concat([f,a.HCM,a.inherit(b,{cN:"function",k:"def"}),a.inherit(b,{cN:"class",k:"class"}),a.CNM,{cN:"decorator",b:"@",e:"$"},{b:"\\b(print|exec)\\("}])}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs); diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery-1.7.2.min.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery-1.7.2.min.js new file mode 100644 index 0000000000..90165e90cf --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery-1.7.2.min.js @@ -0,0 +1,30 @@ +/*! + +Copyright 2014 jQuery Foundation and other contributors +http://jquery.com/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*/ + +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.ajaxfileupload.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.ajaxfileupload.js new file mode 100644 index 0000000000..272976af86 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.ajaxfileupload.js @@ -0,0 +1,184 @@ +/* +* Copyright (c) 2011 Jordan Feldstein + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +// Original code from: https://github.com/jfeldstein/jQuery.AjaxFileUpload.js https://github.com/jfeldstein/jQuery.AjaxFileUpload.js/commit/9dd56b4161cbed138287d3ae29a476bb59eb5fc4 +// All modifications are BSD licensed +// GSI: Modifications made to support immediate upload +/* + // + // - Ajaxifies an individual + // - Files are sandboxed. Doesn't matter how many, or where they are, on the page. + // - Allows for extra parameters to be included with the file + // - onStart callback can cancel the upload by returning false + */ + + +(function ($) { + $.fn.ajaxfileupload = function (options) { + var settings = { + params: {}, + action: '', + onStart: function () { + console.log('starting upload'); + console.log(this); + }, + onComplete: function (response) { + console.log('got response: '); + console.log(response); + console.log(this); + }, + onCancel: function () { + console.log('cancelling: '); + console.log(this); + }, + validate_extensions: true, + valid_extensions: ['gif', 'png', 'jpg', 'jpeg'], + submit_button: null, + upload_now: false + }; + + var uploading_file = false; + + if (options) { + $.extend(settings, options); + } + + + // 'this' is a jQuery collection of one or more (hopefully) + // file elements, but doesn't check for this yet + return this.each(function () { + var $element = $(this); + /* + // Internal handler that tries to parse the response + // and clean up after ourselves. + */ + var handleResponse = function (loadedFrame, element) { + var response, responseStr = loadedFrame.contentWindow.document.body.innerHTML; + try { + //response = $.parseJSON($.trim(responseStr)); + response = JSON.parse(responseStr); + } catch (e) { + response = responseStr; + } + + // Tear-down the wrapper form + element.siblings().remove(); + element.unwrap(); + + uploading_file = false; + + // Pass back to the user + settings.onComplete.apply(element, [response, settings.params]); + }; + /* + // Wraps element in a
tag, and inserts hidden inputs for each + // key:value pair in settings.params so they can be sent along with + // the upload. Then, creates an iframe that the whole thing is + // uploaded through. + */ + var wrapElement = function (element) { + // Create an iframe to submit through, using a semi-unique ID + var frame_id = 'ajaxUploader-iframe-' + Math.round(new Date().getTime() / 1000) + $('body').after('') + : $(''); + + var lyr2 = opts.theme + ? $('') + : $(''); + + var lyr3, s; + if (opts.theme && full) { + s = ''; + } + else if (opts.theme) { + s = ''; + } + else if (full) { + s = ''; + } + else { + s = ''; + } + lyr3 = $(s); + + // if we have a message, style it + if (msg) { + if (opts.theme) { + lyr3.css(themedCSS); + lyr3.addClass('ui-widget-content'); + } + else + lyr3.css(css); + } + + // style the overlay + if (!opts.theme && (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))) + lyr2.css(opts.overlayCSS); + lyr2.css('position', full ? 'fixed' : 'absolute'); + + // make iframe layer transparent in IE + if ($.browser.msie || opts.forceIframe) + lyr1.css('opacity',0.0); + + //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el); + var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el); + $.each(layers, function() { + this.appendTo($par); + }); + + if (opts.theme && opts.draggable && $.fn.draggable) { + lyr3.draggable({ + handle: '.ui-dialog-titlebar', + cancel: 'li' + }); + } + + // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling) + var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0); + if (ie6 || expr) { + // give body 100% height + if (full && opts.allowBodyStretch && $.boxModel) + $('html,body').css('height','100%'); + + // fix ie6 issue when blocked element has a border width + if ((ie6 || !$.boxModel) && !full) { + var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth'); + var fixT = t ? '(0 - '+t+')' : 0; + var fixL = l ? '(0 - '+l+')' : 0; + } + + // simulate fixed position + $.each([lyr1,lyr2,lyr3], function(i,o) { + var s = o[0].style; + s.position = 'absolute'; + if (i < 2) { + full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"') + : s.setExpression('height','this.parentNode.offsetHeight + "px"'); + full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') + : s.setExpression('width','this.parentNode.offsetWidth + "px"'); + if (fixL) s.setExpression('left', fixL); + if (fixT) s.setExpression('top', fixT); + } + else if (opts.centerY) { + if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); + s.marginTop = 0; + } + else if (!opts.centerY && full) { + var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0; + var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"'; + s.setExpression('top',expression); + } + }); + } + + // show the message + if (msg) { + if (opts.theme) + lyr3.find('.ui-widget-content').append(msg); + else + lyr3.append(msg); + if (msg.jquery || msg.nodeType) + $(msg).show(); + } + + if (($.browser.msie || opts.forceIframe) && opts.showOverlay) + lyr1.show(); // opacity is zero + if (opts.fadeIn) { + var cb = opts.onBlock ? opts.onBlock : noOp; + var cb1 = (opts.showOverlay && !msg) ? cb : noOp; + var cb2 = msg ? cb : noOp; + if (opts.showOverlay) + lyr2._fadeIn(opts.fadeIn, cb1); + if (msg) + lyr3._fadeIn(opts.fadeIn, cb2); + } + else { + if (opts.showOverlay) + lyr2.show(); + if (msg) + lyr3.show(); + if (opts.onBlock) + opts.onBlock(); + } + + // bind key and mouse events + bind(1, el, opts); + + if (full) { + pageBlock = lyr3[0]; + pageBlockEls = $(':input:enabled:visible',pageBlock); + if (opts.focusInput) + setTimeout(focus, 20); + } + else + center(lyr3[0], opts.centerX, opts.centerY); + + if (opts.timeout) { + // auto-unblock + var to = setTimeout(function() { + full ? $.unblockUI(opts) : $(el).unblock(opts); + }, opts.timeout); + $(el).data('blockUI.timeout', to); + } +}; + +// remove the block +function remove(el, opts) { + var full = (el == window); + var $el = $(el); + var data = $el.data('blockUI.history'); + var to = $el.data('blockUI.timeout'); + if (to) { + clearTimeout(to); + $el.removeData('blockUI.timeout'); + } + opts = $.extend({}, $.blockUI.defaults, opts || {}); + bind(0, el, opts); // unbind events + + if (opts.onUnblock === null) { + opts.onUnblock = $el.data('blockUI.onUnblock'); + $el.removeData('blockUI.onUnblock'); + } + + var els; + if (full) // crazy selector to handle odd field errors in ie6/7 + els = $('body').children().filter('.blockUI').add('body > .blockUI'); + else + els = $('.blockUI', el); + + if (full) + pageBlock = pageBlockEls = null; + + if (opts.fadeOut) { + els.fadeOut(opts.fadeOut); + setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut); + } + else + reset(els, data, opts, el); +}; + +// move blocking element back into the DOM where it started +function reset(els,data,opts,el) { + els.each(function(i,o) { + // remove via DOM calls so we don't lose event handlers + if (this.parentNode) + this.parentNode.removeChild(this); + }); + + if (data && data.el) { + data.el.style.display = data.display; + data.el.style.position = data.position; + if (data.parent) + data.parent.appendChild(data.el); + $(el).removeData('blockUI.history'); + } + + if (typeof opts.onUnblock == 'function') + opts.onUnblock(el,opts); +}; + +// bind/unbind the handler +function bind(b, el, opts) { + var full = el == window, $el = $(el); + + // don't bother unbinding if there is nothing to unbind + if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked'))) + return; + if (!full) + $el.data('blockUI.isBlocked', b); + + // don't bind events when overlay is not in use or if bindEvents is false + if (!opts.bindEvents || (b && !opts.showOverlay)) + return; + + // bind anchors and inputs for mouse and key events + var events = 'mousedown mouseup keydown keypress'; + b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler); + +// former impl... +// var $e = $('a,:input'); +// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler); +}; + +// event handler to suppress keyboard/mouse events when blocking +function handler(e) { + // allow tab navigation (conditionally) + if (e.keyCode && e.keyCode == 9) { + if (pageBlock && e.data.constrainTabKey) { + var els = pageBlockEls; + var fwd = !e.shiftKey && e.target === els[els.length-1]; + var back = e.shiftKey && e.target === els[0]; + if (fwd || back) { + setTimeout(function(){focus(back)},10); + return false; + } + } + } + var opts = e.data; + // allow events within the message content + if ($(e.target).parents('div.' + opts.blockMsgClass).length > 0) + return true; + + // allow events for content that is not being blocked + return $(e.target).parents().children().filter('div.blockUI').length == 0; +}; + +function focus(back) { + if (!pageBlockEls) + return; + var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0]; + if (e) + e.focus(); +}; + +function center(el, x, y) { + var p = el.parentNode, s = el.style; + var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth'); + var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth'); + if (x) s.left = l > 0 ? (l+'px') : '0'; + if (y) s.top = t > 0 ? (t+'px') : '0'; +}; + +function sz(el, p) { + return parseInt($.css(el,p))||0; +}; + +})(jQuery); diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.cookie.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.cookie.js new file mode 100644 index 0000000000..03079a54e6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.cookie.js @@ -0,0 +1,71 @@ +/* + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +/*! + * jQuery Cookie Plugin + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2011, Klaus Hartl + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://www.opensource.org/licenses/mit-license.php + * http://www.opensource.org/licenses/GPL-2.0 + */ +(function($) { + $.cookie = function(key, value, options) { + + // key and at least value given, set cookie... + if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { + options = $.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var decode = options.raw ? function(s) { return s; } : decodeURIComponent; + + var pairs = document.cookie.split('; '); + for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { + if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined + } + return null; + }; +})(jQuery); diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.form.js b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.form.js new file mode 100644 index 0000000000..114affc67d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/js/lib/jquery.form.js @@ -0,0 +1,806 @@ +/* + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +/*! + * jQuery Form Plugin + * version: 2.47 (04-SEP-2010) + * @requires jQuery v1.3.2 or later + * + * Examples and documentation at: http://malsup.com/jquery/form/ + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +;(function($) { + +/* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are intended to be exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').bind('submit', function() { + $(this).ajaxSubmit({ + target: '#output' + }); + return false; // <-- important! + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. +*/ + +/** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ +$.fn.ajaxSubmit = function(options) { + // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) + if (!this.length) { + log('ajaxSubmit: skipping submit process - no element selected'); + return this; + } + + if (typeof options == 'function') { + options = { success: options }; + } + + var url = $.trim(this.attr('action')); + if (url) { + // clean url (don't include hash vaue) + url = (url.match(/^([^#]+)/)||[])[1]; + } + url = url || window.location.href || ''; + + options = $.extend(true, { + url: url, + type: this.attr('method') || 'GET', + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' + }, options); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + this.trigger('form-pre-serialize', [this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; + } + + // provide opportunity to alter form data before it is serialized + if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSerialize callback'); + return this; + } + + var n,v,a = this.formToArray(options.semantic); + if (options.data) { + options.extraData = options.data; + for (n in options.data) { + if(options.data[n] instanceof Array) { + for (var k in options.data[n]) { + a.push( { name: n, value: options.data[n][k] } ); + } + } + else { + v = options.data[n]; + v = $.isFunction(v) ? v() : v; // if value is fn, invoke it + a.push( { name: n, value: v } ); + } + } + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; + } + + // fire vetoable 'validate' event + this.trigger('form-submit-validate', [a, this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; + } + + var q = $.param(a); + + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else { + options.data = q; // data is the query string for 'post' + } + + var $form = this, callbacks = []; + if (options.resetForm) { + callbacks.push(function() { $form.resetForm(); }); + } + if (options.clearForm) { + callbacks.push(function() { $form.clearForm(); }); + } + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + var fn = options.replaceTarget ? 'replaceWith' : 'html'; + $(options.target)[fn](data).each(oldSuccess, arguments); + }); + } + else if (options.success) { + callbacks.push(options.success); + } + + options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg + var context = options.context || options; // jQuery 1.4+ supports scope context + for (var i=0, max=callbacks.length; i < max; i++) { + callbacks[i].apply(context, [data, status, xhr || $form, $form]); + } + }; + + // are there files to upload? + var fileInputs = $('input:file', this).length > 0; + var mp = 'multipart/form-data'; + var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); + + // options.iframe allows user to force iframe mode + // 06-NOV-09: now defaulting to iframe mode if file input is detected + if (options.iframe !== false && (fileInputs || options.iframe || multipart)) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if (options.closeKeepAlive) { + $.get(options.closeKeepAlive, fileUpload); + } + else { + fileUpload(); + } + } + else { + $.ajax(options); + } + + // fire 'notify' event + this.trigger('form-submit-notify', [this, options]); + return this; + + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUpload() { + var form = $form[0]; + + if ($(':input[name=submit],:input[id=submit]', form).length) { + // if there is an input with a name or id of 'submit' then we won't be + // able to invoke the submit fn on the form (at least not x-browser) + alert('Error: Form elements must not have name or id of "submit".'); + return; + } + + var s = $.extend(true, {}, $.ajaxSettings, options); + s.context = s.context || s; + var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id; + window[fn] = function() { + var f = $io.data('form-plugin-onload'); + if (f) { + f(); + window[fn] = undefined; + try { delete window[fn]; } catch(e){} + } + } + var $io = $('--> +
+ + + \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/files.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/files.html new file mode 100644 index 0000000000..0a27f24a95 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/files.html @@ -0,0 +1,44 @@ + +
+ +
+ +
+ +
#tree
+ +
+
+ +
+ + + +
+ +
+ +
Loading …
+ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/index.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/index.html new file mode 100644 index 0000000000..18fd71a66a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/index.html @@ -0,0 +1,250 @@ + +
+ +
+ +
+ +
+ +

Instance

+ +
+ +
    + +
  • +
    Start
    +
    +
  • + +
  • +
    Host
    +
    +
  • + +
  • +
    CWD
    +
    +
  • + +
  • +
    Instance
    +
    +
  • + +
  • +
    Data
    +
    +
  • + +
  • +
    Index
    +
    +
  • + +
+ +
+ +
+ +
+ +

Versions

+ +
+ +
    + +
  • +
    solr-spec
    +
    +
  • + +
  • +
    solr-impl
    +
    +
  • + +
  • +
    lucene-spec
    +
    +
  • + +
  • +
    lucene-impl
    +
    +
  • + +
+ +
+ +
+ +
+ +
+ +
+ +

System

+ reload + +
+ +
+ +

Physical Memory

+
+ +
+ + +
+ + +
+ +
+ +
+ +
+ +
+ +

Swap Space

+
+ +
+ + +
+ + +
+ +
+ +
+ +
+ +
+ +

File Descriptor Count

+
+ +
+ + +
+ + +
+ +
+ +
+ +
+ +

Sorry, no information available

+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +

JVM

+ +
+ +
    + +
  • +
    Runtime
    +
    +
  • + +
  • +
    Processors
    +
    +
  • + +
  • +
    Args
    +
    +
  • + +
+ +
+ +
+ +
+
+ +
+ +

JVM-Memory

+ +
+ +
+
+ +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/logging.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/logging.html new file mode 100644 index 0000000000..80671e5280 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/logging.html @@ -0,0 +1,23 @@ + +
+ +
+ +
+ +
diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/plugins.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/plugins.html new file mode 100644 index 0000000000..2d4a1a82bb --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/plugins.html @@ -0,0 +1,39 @@ + +
+ +
+ +
+ + + +
+
+ +

Watching for Changes

+ + +
+
+ +
diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/query.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/query.html new file mode 100644 index 0000000000..bd0cdb0698 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/query.html @@ -0,0 +1,361 @@ + +
+ +
+ + + + + + +
+ common +
+ + + + + +
+
+ +
+ [-] + [+] +
+
+
+ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + +
+ + + +
+ +
+ +
\ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/replication.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/replication.html new file mode 100644 index 0000000000..2bfdfbdbd8 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/replication.html @@ -0,0 +1,216 @@ + +
+ +
+ +
+ +
+ +
+ +
+ + Wed May 11 19:41:48 UTC 2011 + +
+ +
+ + 5.1 MB/s + +
+ +
+ +
+ +
24 Files
+
226.85 MB
+ +
+ +
+ + ETA: 25s + +
+ +
+ +
+ + 20% + +
+ +
+ +
2 Files
+
91.76 MB
+ +
+ +
+ +
+ +
+ +
+ +
Current File:
+
_a.fdt
+
+ 84 MB / 102.98 MB [81%] +
+ +
+ +
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexVersionGenSize
Master (Searching)
Master (Replicable)
Slave (Searching)
+ + + +
+ +
Settings:
+
    +
  • +
    master url:
    +
    +
  • +
  • +
    polling enable:
    +
     
    +
  • +
+ +
+ +
+ +
Settings (Master):
+
    +
  • +
    replication enable:
    +
     
    +
  • +
  • +
    replicateAfter:
    +
    +
  • +
  • +
    confFiles:
    +
    +
  • +
+ +
+ + + + + + diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/schema-browser.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/schema-browser.html new file mode 100644 index 0000000000..43386680fa --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/schema-browser.html @@ -0,0 +1,192 @@ + +
+ +
+ +
+ +
+ +
+ +
+

+ : + +

+
+ +
+ +

Because your Index is empty, we have not enough Information about this Field

+ +
+ +
+ +
Field-Type:
+ +
Similarity:
+ +
PI Gap:
+ +
Docs:
+ +
Distinct:
+ +
+ + + + + + + + + + + + + + + + + +
Flags:
+ +
    +
  • + +

    Index Analyzer:

    +
    +
    +
    + +
      +
    • +

      Char Filters:

      +
      +
      +
    • +
    • +

      Tokenizer:

      +
      +
      +
    • +
    • +

      Token Filters:

      +
      +
      +
    • +
    + +
  • +
  • + +

    Query Analyzer:

    +
    +
    +
    + +
      +
    • +

      Char Filters:

      +
      +
      +
    • +
    • +

      Tokenizer:

      +
      +
      +
    • +
    • +

      Token Filters:

      +
      +
      +
    • +
    + +
  • +
+ +
+ +
+ +
+ + + + Autoload + +
+ +

Sorry, no Term Info available :(

+ +
+ +
+

+ + / Top-Terms: + Query  +

+
+ +
    + +
+ +
+ +
+ +

Histogram:

+ +
    + +
    + +
    + +
    + +
    + + + +
    + +
    diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/segments.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/segments.html new file mode 100644 index 0000000000..ffc2177046 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/segments.html @@ -0,0 +1,49 @@ + +
    +
    + +
    + +

    Segments

    + reload + +
    +
    +
    + +
    + +
    + +
    + +
    + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/threads.html b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/threads.html new file mode 100644 index 0000000000..87153ba748 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr-webapp/webapp/tpl/threads.html @@ -0,0 +1,56 @@ + + \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr/README.txt b/KeywordSearch/release/solr/server/solr/README.txt new file mode 100644 index 0000000000..28268b19e6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/README.txt @@ -0,0 +1,77 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +Default Solr Home Directory +============================= + +This directory is the default Solr home directory which holds +configuration files and Solr indexes (called cores). + + +Basic Directory Structure +------------------------- + +The Solr Home directory typically contains the following... + +* solr.xml * + +This is the primary configuration file Solr looks for when starting; +it specifies high-level configuration options that apply to all +of your Solr cores, such as cluster-wide SolrCloud settings like +the ZooKeeper client timeout. + +In addition, you can also declare Solr cores in this file, however +it is recommended to just use automatic core discovery instead of +listing cores in solr.xml. + +If no solr.xml file is found, then Solr assumes that there should be +a single SolrCore named "collection1" and that the "Instance Directory" +for collection1 should be the same as the Solr Home Directory. + +For more information about solr.xml, please see: +https://cwiki.apache.org/confluence/display/solr/Solr+Cores+and+solr.xml + +* Individual SolrCore Instance Directories * + +Although solr.xml can be configured to look for SolrCore Instance Directories +in any path, simple sub-directories of the Solr Home Dir using relative paths +are common for many installations. + +* Core Discovery * + +During startup, Solr will scan sub-directories of Solr home looking for +a specific file named core.properties. If core.properties is found in a +sub-directory (at any depth), Solr will initialize a core using the properties +defined in core.properties. For an example of core.properties, please see: + +example/solr/collection1/core.properties + +For more information about core discovery, please see: +https://cwiki.apache.org/confluence/display/solr/Moving+to+the+New+solr.xml+Format + +* A Shared 'lib' Directory * + +Although solr.xml can be configured with an optional "sharedLib" attribute +that can point to any path, it is common to use a "./lib" sub-directory of the +Solr Home Directory. + +* ZooKeeper Files * + +When using SolrCloud using the embedded ZooKeeper option for Solr, it is +common to have a "zoo.cfg" file and "zoo_data" directories in the Solr Home +Directory. Please see the SolrCloud wiki page for more details... + +https://wiki.apache.org/solr/SolrCloud diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/currency.xml b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/currency.xml new file mode 100644 index 0000000000..3a9c58afee --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/currency.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/solr/conf/elevate.xml b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/elevate.xml similarity index 72% rename from KeywordSearch/release/solr/solr/conf/elevate.xml rename to KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/elevate.xml index 7630ebe20f..2c09ebed66 100644 --- a/KeywordSearch/release/solr/solr/conf/elevate.xml +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/elevate.xml @@ -19,18 +19,24 @@ + + - - - - - - - - - - - - diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_ca.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_ca.txt new file mode 100644 index 0000000000..307a85f913 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_ca.txt @@ -0,0 +1,8 @@ +# Set of Catalan contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +d +l +m +n +s +t diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_fr.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_fr.txt new file mode 100644 index 0000000000..f1bba51b23 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_fr.txt @@ -0,0 +1,15 @@ +# Set of French contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +l +m +t +qu +n +s +j +d +c +jusqu +quoiqu +lorsqu +puisqu diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_ga.txt new file mode 100644 index 0000000000..9ebe7fa349 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_ga.txt @@ -0,0 +1,5 @@ +# Set of Irish contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +d +m +b diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_it.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_it.txt new file mode 100644 index 0000000000..cac0409537 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/contractions_it.txt @@ -0,0 +1,23 @@ +# Set of Italian contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +c +l +all +dall +dell +nell +sull +coll +pell +gl +agl +dagl +degl +negl +sugl +un +m +t +s +v +d diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/hyphenations_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/hyphenations_ga.txt new file mode 100644 index 0000000000..4d2642cc5a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/hyphenations_ga.txt @@ -0,0 +1,5 @@ +# Set of Irish hyphenations for StopFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +h +n +t diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stemdict_nl.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stemdict_nl.txt new file mode 100644 index 0000000000..441072971d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stemdict_nl.txt @@ -0,0 +1,6 @@ +# Set of overrides for the dutch stemmer +# TODO: load this as a resource from the analyzer and sync it in build.xml +fiets fiets +bromfiets bromfiets +ei eier +kind kinder diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stoptags_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stoptags_ja.txt new file mode 100644 index 0000000000..71b750845e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stoptags_ja.txt @@ -0,0 +1,420 @@ +# +# This file defines a Japanese stoptag set for JapanesePartOfSpeechStopFilter. +# +# Any token with a part-of-speech tag that exactly matches those defined in this +# file are removed from the token stream. +# +# Set your own stoptags by uncommenting the lines below. Note that comments are +# not allowed on the same line as a stoptag. See LUCENE-3745 for frequency lists, +# etc. that can be useful for building you own stoptag set. +# +# The entire possible tagset is provided below for convenience. +# +##### +# noun: unclassified nouns +#名詞 +# +# noun-common: Common nouns or nouns where the sub-classification is undefined +#名詞-一般 +# +# noun-proper: Proper nouns where the sub-classification is undefined +#名詞-固有名詞 +# +# noun-proper-misc: miscellaneous proper nouns +#名詞-固有名詞-一般 +# +# noun-proper-person: Personal names where the sub-classification is undefined +#名詞-固有名詞-人名 +# +# noun-proper-person-misc: names that cannot be divided into surname and +# given name; foreign names; names where the surname or given name is unknown. +# e.g. お市の方 +#名詞-固有名詞-人名-一般 +# +# noun-proper-person-surname: Mainly Japanese surnames. +# e.g. 山田 +#名詞-固有名詞-人名-姓 +# +# noun-proper-person-given_name: Mainly Japanese given names. +# e.g. 太郎 +#名詞-固有名詞-人名-名 +# +# noun-proper-organization: Names representing organizations. +# e.g. 通産省, NHK +#名詞-固有名詞-組織 +# +# noun-proper-place: Place names where the sub-classification is undefined +#名詞-固有名詞-地域 +# +# noun-proper-place-misc: Place names excluding countries. +# e.g. アジア, バルセロナ, 京都 +#名詞-固有名詞-地域-一般 +# +# noun-proper-place-country: Country names. +# e.g. 日本, オーストラリア +#名詞-固有名詞-地域-国 +# +# noun-pronoun: Pronouns where the sub-classification is undefined +#名詞-代名詞 +# +# noun-pronoun-misc: miscellaneous pronouns: +# e.g. それ, ここ, あいつ, あなた, あちこち, いくつ, どこか, なに, みなさん, みんな, わたくし, われわれ +#名詞-代名詞-一般 +# +# noun-pronoun-contraction: Spoken language contraction made by combining a +# pronoun and the particle 'wa'. +# e.g. ありゃ, こりゃ, こりゃあ, そりゃ, そりゃあ +#名詞-代名詞-縮約 +# +# noun-adverbial: Temporal nouns such as names of days or months that behave +# like adverbs. Nouns that represent amount or ratios and can be used adverbially, +# e.g. 金曜, 一月, 午後, 少量 +#名詞-副詞可能 +# +# noun-verbal: Nouns that take arguments with case and can appear followed by +# 'suru' and related verbs (する, できる, なさる, くださる) +# e.g. インプット, 愛着, 悪化, 悪戦苦闘, 一安心, 下取り +#名詞-サ変接続 +# +# noun-adjective-base: The base form of adjectives, words that appear before な ("na") +# e.g. 健康, 安易, 駄目, だめ +#名詞-形容動詞語幹 +# +# noun-numeric: Arabic numbers, Chinese numerals, and counters like 何 (回), 数. +# e.g. 0, 1, 2, 何, 数, 幾 +#名詞-数 +# +# noun-affix: noun affixes where the sub-classification is undefined +#名詞-非自立 +# +# noun-affix-misc: Of adnominalizers, the case-marker の ("no"), and words that +# attach to the base form of inflectional words, words that cannot be classified +# into any of the other categories below. This category includes indefinite nouns. +# e.g. あかつき, 暁, かい, 甲斐, 気, きらい, 嫌い, くせ, 癖, こと, 事, ごと, 毎, しだい, 次第, +# 順, せい, 所為, ついで, 序で, つもり, 積もり, 点, どころ, の, はず, 筈, はずみ, 弾み, +# 拍子, ふう, ふり, 振り, ほう, 方, 旨, もの, 物, 者, ゆえ, 故, ゆえん, 所以, わけ, 訳, +# わり, 割り, 割, ん-口語/, もん-口語/ +#名詞-非自立-一般 +# +# noun-affix-adverbial: noun affixes that that can behave as adverbs. +# e.g. あいだ, 間, あげく, 挙げ句, あと, 後, 余り, 以外, 以降, 以後, 以上, 以前, 一方, うえ, +# 上, うち, 内, おり, 折り, かぎり, 限り, きり, っきり, 結果, ころ, 頃, さい, 際, 最中, さなか, +# 最中, じたい, 自体, たび, 度, ため, 為, つど, 都度, とおり, 通り, とき, 時, ところ, 所, +# とたん, 途端, なか, 中, のち, 後, ばあい, 場合, 日, ぶん, 分, ほか, 他, まえ, 前, まま, +# 儘, 侭, みぎり, 矢先 +#名詞-非自立-副詞可能 +# +# noun-affix-aux: noun affixes treated as 助動詞 ("auxiliary verb") in school grammars +# with the stem よう(だ) ("you(da)"). +# e.g. よう, やう, 様 (よう) +#名詞-非自立-助動詞語幹 +# +# noun-affix-adjective-base: noun affixes that can connect to the indeclinable +# connection form な (aux "da"). +# e.g. みたい, ふう +#名詞-非自立-形容動詞語幹 +# +# noun-special: special nouns where the sub-classification is undefined. +#名詞-特殊 +# +# noun-special-aux: The そうだ ("souda") stem form that is used for reporting news, is +# treated as 助動詞 ("auxiliary verb") in school grammars, and attach to the base +# form of inflectional words. +# e.g. そう +#名詞-特殊-助動詞語幹 +# +# noun-suffix: noun suffixes where the sub-classification is undefined. +#名詞-接尾 +# +# noun-suffix-misc: Of the nouns or stem forms of other parts of speech that connect +# to ガル or タイ and can combine into compound nouns, words that cannot be classified into +# any of the other categories below. In general, this category is more inclusive than +# 接尾語 ("suffix") and is usually the last element in a compound noun. +# e.g. おき, かた, 方, 甲斐 (がい), がかり, ぎみ, 気味, ぐるみ, (~した) さ, 次第, 済 (ず) み, +# よう, (でき)っこ, 感, 観, 性, 学, 類, 面, 用 +#名詞-接尾-一般 +# +# noun-suffix-person: Suffixes that form nouns and attach to person names more often +# than other nouns. +# e.g. 君, 様, 著 +#名詞-接尾-人名 +# +# noun-suffix-place: Suffixes that form nouns and attach to place names more often +# than other nouns. +# e.g. 町, 市, 県 +#名詞-接尾-地域 +# +# noun-suffix-verbal: Of the suffixes that attach to nouns and form nouns, those that +# can appear before スル ("suru"). +# e.g. 化, 視, 分け, 入り, 落ち, 買い +#名詞-接尾-サ変接続 +# +# noun-suffix-aux: The stem form of そうだ (様態) that is used to indicate conditions, +# is treated as 助動詞 ("auxiliary verb") in school grammars, and attach to the +# conjunctive form of inflectional words. +# e.g. そう +#名詞-接尾-助動詞語幹 +# +# noun-suffix-adjective-base: Suffixes that attach to other nouns or the conjunctive +# form of inflectional words and appear before the copula だ ("da"). +# e.g. 的, げ, がち +#名詞-接尾-形容動詞語幹 +# +# noun-suffix-adverbial: Suffixes that attach to other nouns and can behave as adverbs. +# e.g. 後 (ご), 以後, 以降, 以前, 前後, 中, 末, 上, 時 (じ) +#名詞-接尾-副詞可能 +# +# noun-suffix-classifier: Suffixes that attach to numbers and form nouns. This category +# is more inclusive than 助数詞 ("classifier") and includes common nouns that attach +# to numbers. +# e.g. 個, つ, 本, 冊, パーセント, cm, kg, カ月, か国, 区画, 時間, 時半 +#名詞-接尾-助数詞 +# +# noun-suffix-special: Special suffixes that mainly attach to inflecting words. +# e.g. (楽し) さ, (考え) 方 +#名詞-接尾-特殊 +# +# noun-suffix-conjunctive: Nouns that behave like conjunctions and join two words +# together. +# e.g. (日本) 対 (アメリカ), 対 (アメリカ), (3) 対 (5), (女優) 兼 (主婦) +#名詞-接続詞的 +# +# noun-verbal_aux: Nouns that attach to the conjunctive particle て ("te") and are +# semantically verb-like. +# e.g. ごらん, ご覧, 御覧, 頂戴 +#名詞-動詞非自立的 +# +# noun-quotation: text that cannot be segmented into words, proverbs, Chinese poetry, +# dialects, English, etc. Currently, the only entry for 名詞 引用文字列 ("noun quotation") +# is いわく ("iwaku"). +#名詞-引用文字列 +# +# noun-nai_adjective: Words that appear before the auxiliary verb ない ("nai") and +# behave like an adjective. +# e.g. 申し訳, 仕方, とんでも, 違い +#名詞-ナイ形容詞語幹 +# +##### +# prefix: unclassified prefixes +#接頭詞 +# +# prefix-nominal: Prefixes that attach to nouns (including adjective stem forms) +# excluding numerical expressions. +# e.g. お (水), 某 (氏), 同 (社), 故 (~氏), 高 (品質), お (見事), ご (立派) +#接頭詞-名詞接続 +# +# prefix-verbal: Prefixes that attach to the imperative form of a verb or a verb +# in conjunctive form followed by なる/なさる/くださる. +# e.g. お (読みなさい), お (座り) +#接頭詞-動詞接続 +# +# prefix-adjectival: Prefixes that attach to adjectives. +# e.g. お (寒いですねえ), バカ (でかい) +#接頭詞-形容詞接続 +# +# prefix-numerical: Prefixes that attach to numerical expressions. +# e.g. 約, およそ, 毎時 +#接頭詞-数接続 +# +##### +# verb: unclassified verbs +#動詞 +# +# verb-main: +#動詞-自立 +# +# verb-auxiliary: +#動詞-非自立 +# +# verb-suffix: +#動詞-接尾 +# +##### +# adjective: unclassified adjectives +#形容詞 +# +# adjective-main: +#形容詞-自立 +# +# adjective-auxiliary: +#形容詞-非自立 +# +# adjective-suffix: +#形容詞-接尾 +# +##### +# adverb: unclassified adverbs +#副詞 +# +# adverb-misc: Words that can be segmented into one unit and where adnominal +# modification is not possible. +# e.g. あいかわらず, 多分 +#副詞-一般 +# +# adverb-particle_conjunction: Adverbs that can be followed by の, は, に, +# な, する, だ, etc. +# e.g. こんなに, そんなに, あんなに, なにか, なんでも +#副詞-助詞類接続 +# +##### +# adnominal: Words that only have noun-modifying forms. +# e.g. この, その, あの, どの, いわゆる, なんらかの, 何らかの, いろんな, こういう, そういう, ああいう, +# どういう, こんな, そんな, あんな, どんな, 大きな, 小さな, おかしな, ほんの, たいした, +# 「(, も) さる (ことながら)」, 微々たる, 堂々たる, 単なる, いかなる, 我が」「同じ, 亡き +#連体詞 +# +##### +# conjunction: Conjunctions that can occur independently. +# e.g. が, けれども, そして, じゃあ, それどころか +接続詞 +# +##### +# particle: unclassified particles. +助詞 +# +# particle-case: case particles where the subclassification is undefined. +助詞-格助詞 +# +# particle-case-misc: Case particles. +# e.g. から, が, で, と, に, へ, より, を, の, にて +助詞-格助詞-一般 +# +# particle-case-quote: the "to" that appears after nouns, a person’s speech, +# quotation marks, expressions of decisions from a meeting, reasons, judgements, +# conjectures, etc. +# e.g. ( だ) と (述べた.), ( である) と (して執行猶予...) +助詞-格助詞-引用 +# +# particle-case-compound: Compounds of particles and verbs that mainly behave +# like case particles. +# e.g. という, といった, とかいう, として, とともに, と共に, でもって, にあたって, に当たって, に当って, +# にあたり, に当たり, に当り, に当たる, にあたる, において, に於いて,に於て, における, に於ける, +# にかけ, にかけて, にかんし, に関し, にかんして, に関して, にかんする, に関する, に際し, +# に際して, にしたがい, に従い, に従う, にしたがって, に従って, にたいし, に対し, にたいして, +# に対して, にたいする, に対する, について, につき, につけ, につけて, につれ, につれて, にとって, +# にとり, にまつわる, によって, に依って, に因って, により, に依り, に因り, による, に依る, に因る, +# にわたって, にわたる, をもって, を以って, を通じ, を通じて, を通して, をめぐって, をめぐり, をめぐる, +# って-口語/, ちゅう-関西弁「という」/, (何) ていう (人)-口語/, っていう-口語/, といふ, とかいふ +助詞-格助詞-連語 +# +# particle-conjunctive: +# e.g. から, からには, が, けれど, けれども, けど, し, つつ, て, で, と, ところが, どころか, とも, ども, +# ながら, なり, ので, のに, ば, ものの, や ( した), やいなや, (ころん) じゃ(いけない)-口語/, +# (行っ) ちゃ(いけない)-口語/, (言っ) たって (しかたがない)-口語/, (それがなく)ったって (平気)-口語/ +助詞-接続助詞 +# +# particle-dependency: +# e.g. こそ, さえ, しか, すら, は, も, ぞ +助詞-係助詞 +# +# particle-adverbial: +# e.g. がてら, かも, くらい, 位, ぐらい, しも, (学校) じゃ(これが流行っている)-口語/, +# (それ)じゃあ (よくない)-口語/, ずつ, (私) なぞ, など, (私) なり (に), (先生) なんか (大嫌い)-口語/, +# (私) なんぞ, (先生) なんて (大嫌い)-口語/, のみ, だけ, (私) だって-口語/, だに, +# (彼)ったら-口語/, (お茶) でも (いかが), 等 (とう), (今後) とも, ばかり, ばっか-口語/, ばっかり-口語/, +# ほど, 程, まで, 迄, (誰) も (が)([助詞-格助詞] および [助詞-係助詞] の前に位置する「も」) +助詞-副助詞 +# +# particle-interjective: particles with interjective grammatical roles. +# e.g. (松島) や +助詞-間投助詞 +# +# particle-coordinate: +# e.g. と, たり, だの, だり, とか, なり, や, やら +助詞-並立助詞 +# +# particle-final: +# e.g. かい, かしら, さ, ぜ, (だ)っけ-口語/, (とまってる) で-方言/, な, ナ, なあ-口語/, ぞ, ね, ネ, +# ねぇ-口語/, ねえ-口語/, ねん-方言/, の, のう-口語/, や, よ, ヨ, よぉ-口語/, わ, わい-口語/ +助詞-終助詞 +# +# particle-adverbial/conjunctive/final: The particle "ka" when unknown whether it is +# adverbial, conjunctive, or sentence final. For example: +# (a) 「A か B か」. Ex:「(国内で運用する) か,(海外で運用する) か (.)」 +# (b) Inside an adverb phrase. Ex:「(幸いという) か (, 死者はいなかった.)」 +# 「(祈りが届いたせい) か (, 試験に合格した.)」 +# (c) 「かのように」. Ex:「(何もなかった) か (のように振る舞った.)」 +# e.g. か +助詞-副助詞/並立助詞/終助詞 +# +# particle-adnominalizer: The "no" that attaches to nouns and modifies +# non-inflectional words. +助詞-連体化 +# +# particle-adnominalizer: The "ni" and "to" that appear following nouns and adverbs +# that are giongo, giseigo, or gitaigo. +# e.g. に, と +助詞-副詞化 +# +# particle-special: A particle that does not fit into one of the above classifications. +# This includes particles that are used in Tanka, Haiku, and other poetry. +# e.g. かな, けむ, ( しただろう) に, (あんた) にゃ(わからん), (俺) ん (家) +助詞-特殊 +# +##### +# auxiliary-verb: +助動詞 +# +##### +# interjection: Greetings and other exclamations. +# e.g. おはよう, おはようございます, こんにちは, こんばんは, ありがとう, どうもありがとう, ありがとうございます, +# いただきます, ごちそうさま, さよなら, さようなら, はい, いいえ, ごめん, ごめんなさい +#感動詞 +# +##### +# symbol: unclassified Symbols. +記号 +# +# symbol-misc: A general symbol not in one of the categories below. +# e.g. [○◎@$〒→+] +記号-一般 +# +# symbol-comma: Commas +# e.g. [,、] +記号-読点 +# +# symbol-period: Periods and full stops. +# e.g. [..。] +記号-句点 +# +# symbol-space: Full-width whitespace. +記号-空白 +# +# symbol-open_bracket: +# e.g. [({‘“『【] +記号-括弧開 +# +# symbol-close_bracket: +# e.g. [)}’”』」】] +記号-括弧閉 +# +# symbol-alphabetic: +#記号-アルファベット +# +##### +# other: unclassified other +#その他 +# +# other-interjection: Words that are hard to classify as noun-suffixes or +# sentence-final particles. +# e.g. (だ)ァ +その他-間投 +# +##### +# filler: Aizuchi that occurs during a conversation or sounds inserted as filler. +# e.g. あの, うんと, えと +フィラー +# +##### +# non-verbal: non-verbal sound. +非言語音 +# +##### +# fragment: +#語断片 +# +##### +# unknown: unknown part of speech. +#未知語 +# +##### End of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ar.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ar.txt new file mode 100644 index 0000000000..046829db6a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ar.txt @@ -0,0 +1,125 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +# Cleaned on October 11, 2009 (not normalized, so use before normalization) +# This means that when modifying this list, you might need to add some +# redundant entries, for example containing forms with both أ and ا +من +ومن +منها +منه +في +وفي +فيها +فيه +و +ف +ثم +او +أو +ب +بها +به +ا +أ +اى +اي +أي +أى +لا +ولا +الا +ألا +إلا +لكن +ما +وما +كما +فما +عن +مع +اذا +إذا +ان +أن +إن +انها +أنها +إنها +انه +أنه +إنه +بان +بأن +فان +فأن +وان +وأن +وإن +التى +التي +الذى +الذي +الذين +الى +الي +إلى +إلي +على +عليها +عليه +اما +أما +إما +ايضا +أيضا +كل +وكل +لم +ولم +لن +ولن +هى +هي +هو +وهى +وهي +وهو +فهى +فهي +فهو +انت +أنت +لك +لها +له +هذه +هذا +تلك +ذلك +هناك +كانت +كان +يكون +تكون +وكانت +وكان +غير +بعض +قد +نحو +بين +بينما +منذ +ضمن +حيث +الان +الآن +خلال +بعد +قبل +حتى +عند +عندما +لدى +جميع diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_bg.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_bg.txt new file mode 100644 index 0000000000..1ae4ba2ae3 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_bg.txt @@ -0,0 +1,193 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +а +аз +ако +ала +бе +без +беше +би +бил +била +били +било +близо +бъдат +бъде +бяха +в +вас +ваш +ваша +вероятно +вече +взема +ви +вие +винаги +все +всеки +всички +всичко +всяка +във +въпреки +върху +г +ги +главно +го +д +да +дали +до +докато +докога +дори +досега +доста +е +едва +един +ето +за +зад +заедно +заради +засега +затова +защо +защото +и +из +или +им +има +имат +иска +й +каза +как +каква +какво +както +какъв +като +кога +когато +което +които +кой +който +колко +която +къде +където +към +ли +м +ме +между +мен +ми +мнозина +мога +могат +може +моля +момента +му +н +на +над +назад +най +направи +напред +например +нас +не +него +нея +ни +ние +никой +нито +но +някои +някой +няма +обаче +около +освен +особено +от +отгоре +отново +още +пак +по +повече +повечето +под +поне +поради +после +почти +прави +пред +преди +през +при +пък +първо +с +са +само +се +сега +си +скоро +след +сме +според +сред +срещу +сте +съм +със +също +т +тази +така +такива +такъв +там +твой +те +тези +ти +тн +то +това +тогава +този +той +толкова +точно +трябва +тук +тъй +тя +тях +у +харесва +ч +че +често +чрез +ще +щом +я diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ca.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ca.txt new file mode 100644 index 0000000000..3da65deafe --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ca.txt @@ -0,0 +1,220 @@ +# Catalan stopwords from http://github.com/vcl/cue.language (Apache 2 Licensed) +a +abans +ací +ah +així +això +al +als +aleshores +algun +alguna +algunes +alguns +alhora +allà +allí +allò +altra +altre +altres +amb +ambdós +ambdues +apa +aquell +aquella +aquelles +aquells +aquest +aquesta +aquestes +aquests +aquí +baix +cada +cadascú +cadascuna +cadascunes +cadascuns +com +contra +d'un +d'una +d'unes +d'uns +dalt +de +del +dels +des +després +dins +dintre +donat +doncs +durant +e +eh +el +els +em +en +encara +ens +entre +érem +eren +éreu +es +és +esta +està +estàvem +estaven +estàveu +esteu +et +etc +ets +fins +fora +gairebé +ha +han +has +havia +he +hem +heu +hi +ho +i +igual +iguals +ja +l'hi +la +les +li +li'n +llavors +m'he +ma +mal +malgrat +mateix +mateixa +mateixes +mateixos +me +mentre +més +meu +meus +meva +meves +molt +molta +moltes +molts +mon +mons +n'he +n'hi +ne +ni +no +nogensmenys +només +nosaltres +nostra +nostre +nostres +o +oh +oi +on +pas +pel +pels +per +però +perquè +poc +poca +pocs +poques +potser +propi +qual +quals +quan +quant +que +què +quelcom +qui +quin +quina +quines +quins +s'ha +s'han +sa +semblant +semblants +ses +seu +seus +seva +seva +seves +si +sobre +sobretot +sóc +solament +sols +son +són +sons +sota +sou +t'ha +t'han +t'he +ta +tal +també +tampoc +tan +tant +tanta +tantes +teu +teus +teva +teves +ton +tons +tot +tota +totes +tots +un +una +unes +uns +us +va +vaig +vam +van +vas +veu +vosaltres +vostra +vostre +vostres diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_cz.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_cz.txt new file mode 100644 index 0000000000..53c6097dac --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_cz.txt @@ -0,0 +1,172 @@ +a +s +k +o +i +u +v +z +dnes +cz +tímto +budeš +budem +byli +jseš +můj +svým +ta +tomto +tohle +tuto +tyto +jej +zda +proč +máte +tato +kam +tohoto +kdo +kteří +mi +nám +tom +tomuto +mít +nic +proto +kterou +byla +toho +protože +asi +ho +naši +napište +re +což +tím +takže +svých +její +svými +jste +aj +tu +tedy +teto +bylo +kde +ke +pravé +ji +nad +nejsou +či +pod +téma +mezi +přes +ty +pak +vám +ani +když +však +neg +jsem +tento +článku +články +aby +jsme +před +pta +jejich +byl +ještě +až +bez +také +pouze +první +vaše +která +nás +nový +tipy +pokud +může +strana +jeho +své +jiné +zprávy +nové +není +vás +jen +podle +zde +už +být +více +bude +již +než +který +by +které +co +nebo +ten +tak +má +při +od +po +jsou +jak +další +ale +si +se +ve +to +jako +za +zpět +ze +do +pro +je +na +atd +atp +jakmile +přičemž +já +on +ona +ono +oni +ony +my +vy +jí +ji +mě +mne +jemu +tomu +těm +těmu +němu +němuž +jehož +jíž +jelikož +jež +jakož +načež diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_da.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_da.txt new file mode 100644 index 0000000000..42e6145b98 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_da.txt @@ -0,0 +1,110 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/danish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Danish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + +og | and +i | in +jeg | I +det | that (dem. pronoun)/it (pers. pronoun) +at | that (in front of a sentence)/to (with infinitive) +en | a/an +den | it (pers. pronoun)/that (dem. pronoun) +til | to/at/for/until/against/by/of/into, more +er | present tense of "to be" +som | who, as +på | on/upon/in/on/at/to/after/of/with/for, on +de | they +med | with/by/in, along +han | he +af | of/by/from/off/for/in/with/on, off +for | at/for/to/from/by/of/ago, in front/before, because +ikke | not +der | who/which, there/those +var | past tense of "to be" +mig | me/myself +sig | oneself/himself/herself/itself/themselves +men | but +et | a/an/one, one (number), someone/somebody/one +har | present tense of "to have" +om | round/about/for/in/a, about/around/down, if +vi | we +min | my +havde | past tense of "to have" +ham | him +hun | she +nu | now +over | over/above/across/by/beyond/past/on/about, over/past +da | then, when/as/since +fra | from/off/since, off, since +du | you +ud | out +sin | his/her/its/one's +dem | them +os | us/ourselves +op | up +man | you/one +hans | his +hvor | where +eller | or +hvad | what +skal | must/shall etc. +selv | myself/youself/herself/ourselves etc., even +her | here +alle | all/everyone/everybody etc. +vil | will (verb) +blev | past tense of "to stay/to remain/to get/to become" +kunne | could +ind | in +når | when +være | present tense of "to be" +dog | however/yet/after all +noget | something +ville | would +jo | you know/you see (adv), yes +deres | their/theirs +efter | after/behind/according to/for/by/from, later/afterwards +ned | down +skulle | should +denne | this +end | than +dette | this +mit | my/mine +også | also +under | under/beneath/below/during, below/underneath +have | have +dig | you +anden | other +hende | her +mine | my +alt | everything +meget | much/very, plenty of +sit | his, her, its, one's +sine | his, her, its, one's +vor | our +mod | against +disse | these +hvis | if +din | your/yours +nogle | some +hos | by/at +blive | be/become +mange | many +ad | by/through +bliver | present tense of "to be/to become" +hendes | her/hers +været | be +thi | for (conj) +jer | you +sådan | such, like this/like that diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_de.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_de.txt new file mode 100644 index 0000000000..86525e7ae0 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_de.txt @@ -0,0 +1,294 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/german/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A German stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | The number of forms in this list is reduced significantly by passing it + | through the German stemmer. + + +aber | but + +alle | all +allem +allen +aller +alles + +als | than, as +also | so +am | an + dem +an | at + +ander | other +andere +anderem +anderen +anderer +anderes +anderm +andern +anderr +anders + +auch | also +auf | on +aus | out of +bei | by +bin | am +bis | until +bist | art +da | there +damit | with it +dann | then + +der | the +den +des +dem +die +das + +daß | that + +derselbe | the same +derselben +denselben +desselben +demselben +dieselbe +dieselben +dasselbe + +dazu | to that + +dein | thy +deine +deinem +deinen +deiner +deines + +denn | because + +derer | of those +dessen | of him + +dich | thee +dir | to thee +du | thou + +dies | this +diese +diesem +diesen +dieser +dieses + + +doch | (several meanings) +dort | (over) there + + +durch | through + +ein | a +eine +einem +einen +einer +eines + +einig | some +einige +einigem +einigen +einiger +einiges + +einmal | once + +er | he +ihn | him +ihm | to him + +es | it +etwas | something + +euer | your +eure +eurem +euren +eurer +eures + +für | for +gegen | towards +gewesen | p.p. of sein +hab | have +habe | have +haben | have +hat | has +hatte | had +hatten | had +hier | here +hin | there +hinter | behind + +ich | I +mich | me +mir | to me + + +ihr | you, to her +ihre +ihrem +ihren +ihrer +ihres +euch | to you + +im | in + dem +in | in +indem | while +ins | in + das +ist | is + +jede | each, every +jedem +jeden +jeder +jedes + +jene | that +jenem +jenen +jener +jenes + +jetzt | now +kann | can + +kein | no +keine +keinem +keinen +keiner +keines + +können | can +könnte | could +machen | do +man | one + +manche | some, many a +manchem +manchen +mancher +manches + +mein | my +meine +meinem +meinen +meiner +meines + +mit | with +muss | must +musste | had to +nach | to(wards) +nicht | not +nichts | nothing +noch | still, yet +nun | now +nur | only +ob | whether +oder | or +ohne | without +sehr | very + +sein | his +seine +seinem +seinen +seiner +seines + +selbst | self +sich | herself + +sie | they, she +ihnen | to them + +sind | are +so | so + +solche | such +solchem +solchen +solcher +solches + +soll | shall +sollte | should +sondern | but +sonst | else +über | over +um | about, around +und | and + +uns | us +unse +unsem +unsen +unser +unses + +unter | under +viel | much +vom | von + dem +von | from +vor | before +während | while +war | was +waren | were +warst | wast +was | what +weg | away, off +weil | because +weiter | further + +welche | which +welchem +welchen +welcher +welches + +wenn | when +werde | will +werden | will +wie | how +wieder | again +will | want +wir | we +wird | will +wirst | willst +wo | where +wollen | want +wollte | wanted +würde | would +würden | would +zu | to +zum | zu + dem +zur | zu + der +zwar | indeed +zwischen | between + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_el.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_el.txt new file mode 100644 index 0000000000..232681f5bd --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_el.txt @@ -0,0 +1,78 @@ +# Lucene Greek Stopwords list +# Note: by default this file is used after GreekLowerCaseFilter, +# so when modifying this file use 'σ' instead of 'ς' +ο +η +το +οι +τα +του +τησ +των +τον +την +και +κι +κ +ειμαι +εισαι +ειναι +ειμαστε +ειστε +στο +στον +στη +στην +μα +αλλα +απο +για +προσ +με +σε +ωσ +παρα +αντι +κατα +μετα +θα +να +δε +δεν +μη +μην +επι +ενω +εαν +αν +τοτε +που +πωσ +ποιοσ +ποια +ποιο +ποιοι +ποιεσ +ποιων +ποιουσ +αυτοσ +αυτη +αυτο +αυτοι +αυτων +αυτουσ +αυτεσ +αυτα +εκεινοσ +εκεινη +εκεινο +εκεινοι +εκεινεσ +εκεινα +εκεινων +εκεινουσ +οπωσ +ομωσ +ισωσ +οσο +οτι diff --git a/KeywordSearch/release/solr/solr/conf/stopwords_en.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_en.txt similarity index 100% rename from KeywordSearch/release/solr/solr/conf/stopwords_en.txt rename to KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_en.txt diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_es.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_es.txt new file mode 100644 index 0000000000..487d78c8d5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_es.txt @@ -0,0 +1,356 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/spanish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Spanish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + + | The following is a ranked list (commonest to rarest) of stopwords + | deriving from a large sample of text. + + | Extra words have been added at the end. + +de | from, of +la | the, her +que | who, that +el | the +en | in +y | and +a | to +los | the, them +del | de + el +se | himself, from him etc +las | the, them +por | for, by, etc +un | a +para | for +con | with +no | no +una | a +su | his, her +al | a + el + | es from SER +lo | him +como | how +más | more +pero | pero +sus | su plural +le | to him, her +ya | already +o | or + | fue from SER +este | this + | ha from HABER +sí | himself etc +porque | because +esta | this + | son from SER +entre | between + | está from ESTAR +cuando | when +muy | very +sin | without +sobre | on + | ser from SER + | tiene from TENER +también | also +me | me +hasta | until +hay | there is/are +donde | where + | han from HABER +quien | whom, that + | están from ESTAR + | estado from ESTAR +desde | from +todo | all +nos | us +durante | during + | estados from ESTAR +todos | all +uno | a +les | to them +ni | nor +contra | against +otros | other + | fueron from SER +ese | that +eso | that + | había from HABER +ante | before +ellos | they +e | and (variant of y) +esto | this +mí | me +antes | before +algunos | some +qué | what? +unos | a +yo | I +otro | other +otras | other +otra | other +él | he +tanto | so much, many +esa | that +estos | these +mucho | much, many +quienes | who +nada | nothing +muchos | many +cual | who + | sea from SER +poco | few +ella | she +estar | to be + | haber from HABER +estas | these + | estaba from ESTAR + | estamos from ESTAR +algunas | some +algo | something +nosotros | we + + | other forms + +mi | me +mis | mi plural +tú | thou +te | thee +ti | thee +tu | thy +tus | tu plural +ellas | they +nosotras | we +vosotros | you +vosotras | you +os | you +mío | mine +mía | +míos | +mías | +tuyo | thine +tuya | +tuyos | +tuyas | +suyo | his, hers, theirs +suya | +suyos | +suyas | +nuestro | ours +nuestra | +nuestros | +nuestras | +vuestro | yours +vuestra | +vuestros | +vuestras | +esos | those +esas | those + + | forms of estar, to be (not including the infinitive): +estoy +estás +está +estamos +estáis +están +esté +estés +estemos +estéis +estén +estaré +estarás +estará +estaremos +estaréis +estarán +estaría +estarías +estaríamos +estaríais +estarían +estaba +estabas +estábamos +estabais +estaban +estuve +estuviste +estuvo +estuvimos +estuvisteis +estuvieron +estuviera +estuvieras +estuviéramos +estuvierais +estuvieran +estuviese +estuvieses +estuviésemos +estuvieseis +estuviesen +estando +estado +estada +estados +estadas +estad + + | forms of haber, to have (not including the infinitive): +he +has +ha +hemos +habéis +han +haya +hayas +hayamos +hayáis +hayan +habré +habrás +habrá +habremos +habréis +habrán +habría +habrías +habríamos +habríais +habrían +había +habías +habíamos +habíais +habían +hube +hubiste +hubo +hubimos +hubisteis +hubieron +hubiera +hubieras +hubiéramos +hubierais +hubieran +hubiese +hubieses +hubiésemos +hubieseis +hubiesen +habiendo +habido +habida +habidos +habidas + + | forms of ser, to be (not including the infinitive): +soy +eres +es +somos +sois +son +sea +seas +seamos +seáis +sean +seré +serás +será +seremos +seréis +serán +sería +serías +seríamos +seríais +serían +era +eras +éramos +erais +eran +fui +fuiste +fue +fuimos +fuisteis +fueron +fuera +fueras +fuéramos +fuerais +fueran +fuese +fueses +fuésemos +fueseis +fuesen +siendo +sido + | sed also means 'thirst' + + | forms of tener, to have (not including the infinitive): +tengo +tienes +tiene +tenemos +tenéis +tienen +tenga +tengas +tengamos +tengáis +tengan +tendré +tendrás +tendrá +tendremos +tendréis +tendrán +tendría +tendrías +tendríamos +tendríais +tendrían +tenía +tenías +teníamos +teníais +tenían +tuve +tuviste +tuvo +tuvimos +tuvisteis +tuvieron +tuviera +tuvieras +tuviéramos +tuvierais +tuvieran +tuviese +tuvieses +tuviésemos +tuvieseis +tuviesen +teniendo +tenido +tenida +tenidos +tenidas +tened + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_eu.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_eu.txt new file mode 100644 index 0000000000..25f1db9346 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_eu.txt @@ -0,0 +1,99 @@ +# example set of basque stopwords +al +anitz +arabera +asko +baina +bat +batean +batek +bati +batzuei +batzuek +batzuetan +batzuk +bera +beraiek +berau +berauek +bere +berori +beroriek +beste +bezala +da +dago +dira +ditu +du +dute +edo +egin +ere +eta +eurak +ez +gainera +gu +gutxi +guzti +haiei +haiek +haietan +hainbeste +hala +han +handik +hango +hara +hari +hark +hartan +hau +hauei +hauek +hauetan +hemen +hemendik +hemengo +hi +hona +honek +honela +honetan +honi +hor +hori +horiei +horiek +horietan +horko +horra +horrek +horrela +horretan +horri +hortik +hura +izan +ni +noiz +nola +non +nondik +nongo +nor +nora +ze +zein +zen +zenbait +zenbat +zer +zergatik +ziren +zituen +zu +zuek +zuen +zuten diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fa.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fa.txt new file mode 100644 index 0000000000..723641c6da --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fa.txt @@ -0,0 +1,313 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +# Note: by default this file is used after normalization, so when adding entries +# to this file, use the arabic 'ي' instead of 'ی' +انان +نداشته +سراسر +خياه +ايشان +وي +تاكنون +بيشتري +دوم +پس +ناشي +وگو +يا +داشتند +سپس +هنگام +هرگز +پنج +نشان +امسال +ديگر +گروهي +شدند +چطور +ده +و +دو +نخستين +ولي +چرا +چه +وسط +ه +كدام +قابل +يك +رفت +هفت +همچنين +در +هزار +بله +بلي +شايد +اما +شناسي +گرفته +دهد +داشته +دانست +داشتن +خواهيم +ميليارد +وقتيكه +امد +خواهد +جز +اورده +شده +بلكه +خدمات +شدن +برخي +نبود +بسياري +جلوگيري +حق +كردند +نوعي +بعري +نكرده +نظير +نبايد +بوده +بودن +داد +اورد +هست +جايي +شود +دنبال +داده +بايد +سابق +هيچ +همان +انجا +كمتر +كجاست +گردد +كسي +تر +مردم +تان +دادن +بودند +سري +جدا +ندارند +مگر +يكديگر +دارد +دهند +بنابراين +هنگامي +سمت +جا +انچه +خود +دادند +زياد +دارند +اثر +بدون +بهترين +بيشتر +البته +به +براساس +بيرون +كرد +بعضي +گرفت +توي +اي +ميليون +او +جريان +تول +بر +مانند +برابر +باشيم +مدتي +گويند +اكنون +تا +تنها +جديد +چند +بي +نشده +كردن +كردم +گويد +كرده +كنيم +نمي +نزد +روي +قصد +فقط +بالاي +ديگران +اين +ديروز +توسط +سوم +ايم +دانند +سوي +استفاده +شما +كنار +داريم +ساخته +طور +امده +رفته +نخست +بيست +نزديك +طي +كنيد +از +انها +تمامي +داشت +يكي +طريق +اش +چيست +روب +نمايد +گفت +چندين +چيزي +تواند +ام +ايا +با +ان +ايد +ترين +اينكه +ديگري +راه +هايي +بروز +همچنان +پاعين +كس +حدود +مختلف +مقابل +چيز +گيرد +ندارد +ضد +همچون +سازي +شان +مورد +باره +مرسي +خويش +برخوردار +چون +خارج +شش +هنوز +تحت +ضمن +هستيم +گفته +فكر +بسيار +پيش +براي +روزهاي +انكه +نخواهد +بالا +كل +وقتي +كي +چنين +كه +گيري +نيست +است +كجا +كند +نيز +يابد +بندي +حتي +توانند +عقب +خواست +كنند +بين +تمام +همه +ما +باشند +مثل +شد +اري +باشد +اره +طبق +بعد +اگر +صورت +غير +جاي +بيش +ريزي +اند +زيرا +چگونه +بار +لطفا +مي +درباره +من +ديده +همين +گذاري +برداري +علت +گذاشته +هم +فوق +نه +ها +شوند +اباد +همواره +هر +اول +خواهند +چهار +نام +امروز +مان +هاي +قبل +كنم +سعي +تازه +را +هستند +زير +جلوي +عنوان +بود diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fi.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fi.txt new file mode 100644 index 0000000000..4372c9a055 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fi.txt @@ -0,0 +1,97 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/finnish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + +| forms of BE + +olla +olen +olet +on +olemme +olette +ovat +ole | negative form + +oli +olisi +olisit +olisin +olisimme +olisitte +olisivat +olit +olin +olimme +olitte +olivat +ollut +olleet + +en | negation +et +ei +emme +ette +eivät + +|Nom Gen Acc Part Iness Elat Illat Adess Ablat Allat Ess Trans +minä minun minut minua minussa minusta minuun minulla minulta minulle | I +sinä sinun sinut sinua sinussa sinusta sinuun sinulla sinulta sinulle | you +hän hänen hänet häntä hänessä hänestä häneen hänellä häneltä hänelle | he she +me meidän meidät meitä meissä meistä meihin meillä meiltä meille | we +te teidän teidät teitä teissä teistä teihin teillä teiltä teille | you +he heidän heidät heitä heissä heistä heihin heillä heiltä heille | they + +tämä tämän tätä tässä tästä tähän tallä tältä tälle tänä täksi | this +tuo tuon tuotä tuossa tuosta tuohon tuolla tuolta tuolle tuona tuoksi | that +se sen sitä siinä siitä siihen sillä siltä sille sinä siksi | it +nämä näiden näitä näissä näistä näihin näillä näiltä näille näinä näiksi | these +nuo noiden noita noissa noista noihin noilla noilta noille noina noiksi | those +ne niiden niitä niissä niistä niihin niillä niiltä niille niinä niiksi | they + +kuka kenen kenet ketä kenessä kenestä keneen kenellä keneltä kenelle kenenä keneksi| who +ketkä keiden ketkä keitä keissä keistä keihin keillä keiltä keille keinä keiksi | (pl) +mikä minkä minkä mitä missä mistä mihin millä miltä mille minä miksi | which what +mitkä | (pl) + +joka jonka jota jossa josta johon jolla jolta jolle jona joksi | who which +jotka joiden joita joissa joista joihin joilla joilta joille joina joiksi | (pl) + +| conjunctions + +että | that +ja | and +jos | if +koska | because +kuin | than +mutta | but +niin | so +sekä | and +sillä | for +tai | or +vaan | but +vai | or +vaikka | although + + +| prepositions + +kanssa | with +mukaan | according to +noin | about +poikki | across +yli | over, across + +| other + +kun | when +niin | so +nyt | now +itse | self + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fr.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fr.txt new file mode 100644 index 0000000000..749abae684 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_fr.txt @@ -0,0 +1,186 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/french/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A French stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + +au | a + le +aux | a + les +avec | with +ce | this +ces | these +dans | with +de | of +des | de + les +du | de + le +elle | she +en | `of them' etc +et | and +eux | them +il | he +je | I +la | the +le | the +leur | their +lui | him +ma | my (fem) +mais | but +me | me +même | same; as in moi-même (myself) etc +mes | me (pl) +moi | me +mon | my (masc) +ne | not +nos | our (pl) +notre | our +nous | we +on | one +ou | where +par | by +pas | not +pour | for +qu | que before vowel +que | that +qui | who +sa | his, her (fem) +se | oneself +ses | his (pl) +son | his, her (masc) +sur | on +ta | thy (fem) +te | thee +tes | thy (pl) +toi | thee +ton | thy (masc) +tu | thou +un | a +une | a +vos | your (pl) +votre | your +vous | you + + | single letter forms + +c | c' +d | d' +j | j' +l | l' +à | to, at +m | m' +n | n' +s | s' +t | t' +y | there + + | forms of être (not including the infinitive): +été +étée +étées +étés +étant +suis +es +est +sommes +êtes +sont +serai +seras +sera +serons +serez +seront +serais +serait +serions +seriez +seraient +étais +était +étions +étiez +étaient +fus +fut +fûmes +fûtes +furent +sois +soit +soyons +soyez +soient +fusse +fusses +fût +fussions +fussiez +fussent + + | forms of avoir (not including the infinitive): +ayant +eu +eue +eues +eus +ai +as +avons +avez +ont +aurai +auras +aura +aurons +aurez +auront +aurais +aurait +aurions +auriez +auraient +avais +avait +avions +aviez +avaient +eut +eûmes +eûtes +eurent +aie +aies +ait +ayons +ayez +aient +eusse +eusses +eût +eussions +eussiez +eussent + + | Later additions (from Jean-Christophe Deschamps) +ceci | this +cela | that +celà | that +cet | this +cette | this +ici | here +ils | they +les | the (pl) +leurs | their (pl) +quel | which +quels | which +quelle | which +quelles | which +sans | without +soi | oneself + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ga.txt new file mode 100644 index 0000000000..9ff88d747e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ga.txt @@ -0,0 +1,110 @@ + +a +ach +ag +agus +an +aon +ar +arna +as +b' +ba +beirt +bhúr +caoga +ceathair +ceathrar +chomh +chtó +chuig +chun +cois +céad +cúig +cúigear +d' +daichead +dar +de +deich +deichniúr +den +dhá +do +don +dtí +dá +dár +dó +faoi +faoin +faoina +faoinár +fara +fiche +gach +gan +go +gur +haon +hocht +i +iad +idir +in +ina +ins +inár +is +le +leis +lena +lenár +m' +mar +mo +mé +na +nach +naoi +naonúr +ná +ní +níor +nó +nócha +ocht +ochtar +os +roimh +sa +seacht +seachtar +seachtó +seasca +seisear +siad +sibh +sinn +sna +sé +sí +tar +thar +thú +triúr +trí +trína +trínár +tríocha +tú +um +ár +é +éis +í +ó +ón +óna +ónár diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_gl.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_gl.txt new file mode 100644 index 0000000000..d8760b12c1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_gl.txt @@ -0,0 +1,161 @@ +# galican stopwords +a +aínda +alí +aquel +aquela +aquelas +aqueles +aquilo +aquí +ao +aos +as +así +á +ben +cando +che +co +coa +comigo +con +connosco +contigo +convosco +coas +cos +cun +cuns +cunha +cunhas +da +dalgunha +dalgunhas +dalgún +dalgúns +das +de +del +dela +delas +deles +desde +deste +do +dos +dun +duns +dunha +dunhas +e +el +ela +elas +eles +en +era +eran +esa +esas +ese +eses +esta +estar +estaba +está +están +este +estes +estiven +estou +eu +é +facer +foi +foron +fun +había +hai +iso +isto +la +las +lle +lles +lo +los +mais +me +meu +meus +min +miña +miñas +moi +na +nas +neste +nin +no +non +nos +nosa +nosas +noso +nosos +nós +nun +nunha +nuns +nunhas +o +os +ou +ó +ós +para +pero +pode +pois +pola +polas +polo +polos +por +que +se +senón +ser +seu +seus +sexa +sido +sobre +súa +súas +tamén +tan +te +ten +teñen +teño +ter +teu +teus +ti +tido +tiña +tiven +túa +túas +un +unha +unhas +uns +vos +vosa +vosas +voso +vosos +vós diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hi.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hi.txt new file mode 100644 index 0000000000..86286bb083 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hi.txt @@ -0,0 +1,235 @@ +# Also see http://www.opensource.org/licenses/bsd-license.html +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# This file was created by Jacques Savoy and is distributed under the BSD license. +# Note: by default this file also contains forms normalized by HindiNormalizer +# for spelling variation (see section below), such that it can be used whether or +# not you enable that feature. When adding additional entries to this list, +# please add the normalized form as well. +अंदर +अत +अपना +अपनी +अपने +अभी +आदि +आप +इत्यादि +इन +इनका +इन्हीं +इन्हें +इन्हों +इस +इसका +इसकी +इसके +इसमें +इसी +इसे +उन +उनका +उनकी +उनके +उनको +उन्हीं +उन्हें +उन्हों +उस +उसके +उसी +उसे +एक +एवं +एस +ऐसे +और +कई +कर +करता +करते +करना +करने +करें +कहते +कहा +का +काफ़ी +कि +कितना +किन्हें +किन्हों +किया +किर +किस +किसी +किसे +की +कुछ +कुल +के +को +कोई +कौन +कौनसा +गया +घर +जब +जहाँ +जा +जितना +जिन +जिन्हें +जिन्हों +जिस +जिसे +जीधर +जैसा +जैसे +जो +तक +तब +तरह +तिन +तिन्हें +तिन्हों +तिस +तिसे +तो +था +थी +थे +दबारा +दिया +दुसरा +दूसरे +दो +द्वारा +न +नहीं +ना +निहायत +नीचे +ने +पर +पर +पहले +पूरा +पे +फिर +बनी +बही +बहुत +बाद +बाला +बिलकुल +भी +भीतर +मगर +मानो +मे +में +यदि +यह +यहाँ +यही +या +यिह +ये +रखें +रहा +रहे +ऱ्वासा +लिए +लिये +लेकिन +व +वर्ग +वह +वह +वहाँ +वहीं +वाले +वुह +वे +वग़ैरह +संग +सकता +सकते +सबसे +सभी +साथ +साबुत +साभ +सारा +से +सो +ही +हुआ +हुई +हुए +है +हैं +हो +होता +होती +होते +होना +होने +# additional normalized forms of the above +अपनि +जेसे +होति +सभि +तिंहों +इंहों +दवारा +इसि +किंहें +थि +उंहों +ओर +जिंहें +वहिं +अभि +बनि +हि +उंहिं +उंहें +हें +वगेरह +एसे +रवासा +कोन +निचे +काफि +उसि +पुरा +भितर +हे +बहि +वहां +कोइ +यहां +जिंहों +तिंहें +किसि +कइ +यहि +इंहिं +जिधर +इंहें +अदि +इतयादि +हुइ +कोनसा +इसकि +दुसरे +जहां +अप +किंहों +उनकि +भि +वरग +हुअ +जेसा +नहिं diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hu.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hu.txt new file mode 100644 index 0000000000..37526da8aa --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hu.txt @@ -0,0 +1,211 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/hungarian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + +| Hungarian stop word list +| prepared by Anna Tordai + +a +ahogy +ahol +aki +akik +akkor +alatt +által +általában +amely +amelyek +amelyekben +amelyeket +amelyet +amelynek +ami +amit +amolyan +amíg +amikor +át +abban +ahhoz +annak +arra +arról +az +azok +azon +azt +azzal +azért +aztán +azután +azonban +bár +be +belül +benne +cikk +cikkek +cikkeket +csak +de +e +eddig +egész +egy +egyes +egyetlen +egyéb +egyik +egyre +ekkor +el +elég +ellen +elő +először +előtt +első +én +éppen +ebben +ehhez +emilyen +ennek +erre +ez +ezt +ezek +ezen +ezzel +ezért +és +fel +felé +hanem +hiszen +hogy +hogyan +igen +így +illetve +ill. +ill +ilyen +ilyenkor +ison +ismét +itt +jó +jól +jobban +kell +kellett +keresztül +keressünk +ki +kívül +között +közül +legalább +lehet +lehetett +legyen +lenne +lenni +lesz +lett +maga +magát +majd +majd +már +más +másik +meg +még +mellett +mert +mely +melyek +mi +mit +míg +miért +milyen +mikor +minden +mindent +mindenki +mindig +mint +mintha +mivel +most +nagy +nagyobb +nagyon +ne +néha +nekem +neki +nem +néhány +nélkül +nincs +olyan +ott +össze +ő +ők +őket +pedig +persze +rá +s +saját +sem +semmi +sok +sokat +sokkal +számára +szemben +szerint +szinte +talán +tehát +teljes +tovább +továbbá +több +úgy +ugyanis +új +újabb +újra +után +utána +utolsó +vagy +vagyis +valaki +valami +valamint +való +vagyok +van +vannak +volt +voltam +voltak +voltunk +vissza +vele +viszont +volna diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hy.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hy.txt new file mode 100644 index 0000000000..60c1c50fbc --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_hy.txt @@ -0,0 +1,46 @@ +# example set of Armenian stopwords. +այդ +այլ +այն +այս +դու +դուք +եմ +են +ենք +ես +եք +է +էի +էին +էինք +էիր +էիք +էր +ըստ +թ +ի +ին +իսկ +իր +կամ +համար +հետ +հետո +մենք +մեջ +մի +ն +նա +նաև +նրա +նրանք +որ +որը +որոնք +որպես +ու +ում +պիտի +վրա +և diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_id.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_id.txt new file mode 100644 index 0000000000..4617f83a5c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_id.txt @@ -0,0 +1,359 @@ +# from appendix D of: A Study of Stemming Effects on Information +# Retrieval in Bahasa Indonesia +ada +adanya +adalah +adapun +agak +agaknya +agar +akan +akankah +akhirnya +aku +akulah +amat +amatlah +anda +andalah +antar +diantaranya +antara +antaranya +diantara +apa +apaan +mengapa +apabila +apakah +apalagi +apatah +atau +ataukah +ataupun +bagai +bagaikan +sebagai +sebagainya +bagaimana +bagaimanapun +sebagaimana +bagaimanakah +bagi +bahkan +bahwa +bahwasanya +sebaliknya +banyak +sebanyak +beberapa +seberapa +begini +beginian +beginikah +beginilah +sebegini +begitu +begitukah +begitulah +begitupun +sebegitu +belum +belumlah +sebelum +sebelumnya +sebenarnya +berapa +berapakah +berapalah +berapapun +betulkah +sebetulnya +biasa +biasanya +bila +bilakah +bisa +bisakah +sebisanya +boleh +bolehkah +bolehlah +buat +bukan +bukankah +bukanlah +bukannya +cuma +percuma +dahulu +dalam +dan +dapat +dari +daripada +dekat +demi +demikian +demikianlah +sedemikian +dengan +depan +di +dia +dialah +dini +diri +dirinya +terdiri +dong +dulu +enggak +enggaknya +entah +entahlah +terhadap +terhadapnya +hal +hampir +hanya +hanyalah +harus +haruslah +harusnya +seharusnya +hendak +hendaklah +hendaknya +hingga +sehingga +ia +ialah +ibarat +ingin +inginkah +inginkan +ini +inikah +inilah +itu +itukah +itulah +jangan +jangankan +janganlah +jika +jikalau +juga +justru +kala +kalau +kalaulah +kalaupun +kalian +kami +kamilah +kamu +kamulah +kan +kapan +kapankah +kapanpun +dikarenakan +karena +karenanya +ke +kecil +kemudian +kenapa +kepada +kepadanya +ketika +seketika +khususnya +kini +kinilah +kiranya +sekiranya +kita +kitalah +kok +lagi +lagian +selagi +lah +lain +lainnya +melainkan +selaku +lalu +melalui +terlalu +lama +lamanya +selama +selama +selamanya +lebih +terlebih +bermacam +macam +semacam +maka +makanya +makin +malah +malahan +mampu +mampukah +mana +manakala +manalagi +masih +masihkah +semasih +masing +mau +maupun +semaunya +memang +mereka +merekalah +meski +meskipun +semula +mungkin +mungkinkah +nah +namun +nanti +nantinya +nyaris +oleh +olehnya +seorang +seseorang +pada +padanya +padahal +paling +sepanjang +pantas +sepantasnya +sepantasnyalah +para +pasti +pastilah +per +pernah +pula +pun +merupakan +rupanya +serupa +saat +saatnya +sesaat +saja +sajalah +saling +bersama +sama +sesama +sambil +sampai +sana +sangat +sangatlah +saya +sayalah +se +sebab +sebabnya +sebuah +tersebut +tersebutlah +sedang +sedangkan +sedikit +sedikitnya +segala +segalanya +segera +sesegera +sejak +sejenak +sekali +sekalian +sekalipun +sesekali +sekaligus +sekarang +sekarang +sekitar +sekitarnya +sela +selain +selalu +seluruh +seluruhnya +semakin +sementara +sempat +semua +semuanya +sendiri +sendirinya +seolah +seperti +sepertinya +sering +seringnya +serta +siapa +siapakah +siapapun +disini +disinilah +sini +sinilah +sesuatu +sesuatunya +suatu +sesudah +sesudahnya +sudah +sudahkah +sudahlah +supaya +tadi +tadinya +tak +tanpa +setelah +telah +tentang +tentu +tentulah +tentunya +tertentu +seterusnya +tapi +tetapi +setiap +tiap +setidaknya +tidak +tidakkah +tidaklah +toh +waduh +wah +wahai +sewaktu +walau +walaupun +wong +yaitu +yakni +yang diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_it.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_it.txt new file mode 100644 index 0000000000..1219cc773a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_it.txt @@ -0,0 +1,303 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/italian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | An Italian stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + +ad | a (to) before vowel +al | a + il +allo | a + lo +ai | a + i +agli | a + gli +all | a + l' +agl | a + gl' +alla | a + la +alle | a + le +con | with +col | con + il +coi | con + i (forms collo, cogli etc are now very rare) +da | from +dal | da + il +dallo | da + lo +dai | da + i +dagli | da + gli +dall | da + l' +dagl | da + gll' +dalla | da + la +dalle | da + le +di | of +del | di + il +dello | di + lo +dei | di + i +degli | di + gli +dell | di + l' +degl | di + gl' +della | di + la +delle | di + le +in | in +nel | in + el +nello | in + lo +nei | in + i +negli | in + gli +nell | in + l' +negl | in + gl' +nella | in + la +nelle | in + le +su | on +sul | su + il +sullo | su + lo +sui | su + i +sugli | su + gli +sull | su + l' +sugl | su + gl' +sulla | su + la +sulle | su + le +per | through, by +tra | among +contro | against +io | I +tu | thou +lui | he +lei | she +noi | we +voi | you +loro | they +mio | my +mia | +miei | +mie | +tuo | +tua | +tuoi | thy +tue | +suo | +sua | +suoi | his, her +sue | +nostro | our +nostra | +nostri | +nostre | +vostro | your +vostra | +vostri | +vostre | +mi | me +ti | thee +ci | us, there +vi | you, there +lo | him, the +la | her, the +li | them +le | them, the +gli | to him, the +ne | from there etc +il | the +un | a +uno | a +una | a +ma | but +ed | and +se | if +perché | why, because +anche | also +come | how +dov | where (as dov') +dove | where +che | who, that +chi | who +cui | whom +non | not +più | more +quale | who, that +quanto | how much +quanti | +quanta | +quante | +quello | that +quelli | +quella | +quelle | +questo | this +questi | +questa | +queste | +si | yes +tutto | all +tutti | all + + | single letter forms: + +a | at +c | as c' for ce or ci +e | and +i | the +l | as l' +o | or + + | forms of avere, to have (not including the infinitive): + +ho +hai +ha +abbiamo +avete +hanno +abbia +abbiate +abbiano +avrò +avrai +avrà +avremo +avrete +avranno +avrei +avresti +avrebbe +avremmo +avreste +avrebbero +avevo +avevi +aveva +avevamo +avevate +avevano +ebbi +avesti +ebbe +avemmo +aveste +ebbero +avessi +avesse +avessimo +avessero +avendo +avuto +avuta +avuti +avute + + | forms of essere, to be (not including the infinitive): +sono +sei +è +siamo +siete +sia +siate +siano +sarò +sarai +sarà +saremo +sarete +saranno +sarei +saresti +sarebbe +saremmo +sareste +sarebbero +ero +eri +era +eravamo +eravate +erano +fui +fosti +fu +fummo +foste +furono +fossi +fosse +fossimo +fossero +essendo + + | forms of fare, to do (not including the infinitive, fa, fat-): +faccio +fai +facciamo +fanno +faccia +facciate +facciano +farò +farai +farà +faremo +farete +faranno +farei +faresti +farebbe +faremmo +fareste +farebbero +facevo +facevi +faceva +facevamo +facevate +facevano +feci +facesti +fece +facemmo +faceste +fecero +facessi +facesse +facessimo +facessero +facendo + + | forms of stare, to be (not including the infinitive): +sto +stai +sta +stiamo +stanno +stia +stiate +stiano +starò +starai +starà +staremo +starete +staranno +starei +staresti +starebbe +staremmo +stareste +starebbero +stavo +stavi +stava +stavamo +stavate +stavano +stetti +stesti +stette +stemmo +steste +stettero +stessi +stesse +stessimo +stessero +stando diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ja.txt new file mode 100644 index 0000000000..d4321be6b1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ja.txt @@ -0,0 +1,127 @@ +# +# This file defines a stopword set for Japanese. +# +# This set is made up of hand-picked frequent terms from segmented Japanese Wikipedia. +# Punctuation characters and frequent kanji have mostly been left out. See LUCENE-3745 +# for frequency lists, etc. that can be useful for making your own set (if desired) +# +# Note that there is an overlap between these stopwords and the terms stopped when used +# in combination with the JapanesePartOfSpeechStopFilter. When editing this file, note +# that comments are not allowed on the same line as stopwords. +# +# Also note that stopping is done in a case-insensitive manner. Change your StopFilter +# configuration if you need case-sensitive stopping. Lastly, note that stopping is done +# using the same character width as the entries in this file. Since this StopFilter is +# normally done after a CJKWidthFilter in your chain, you would usually want your romaji +# entries to be in half-width and your kana entries to be in full-width. +# +の +に +は +を +た +が +で +て +と +し +れ +さ +ある +いる +も +する +から +な +こと +として +い +や +れる +など +なっ +ない +この +ため +その +あっ +よう +また +もの +という +あり +まで +られ +なる +へ +か +だ +これ +によって +により +おり +より +による +ず +なり +られる +において +ば +なかっ +なく +しかし +について +せ +だっ +その後 +できる +それ +う +ので +なお +のみ +でき +き +つ +における +および +いう +さらに +でも +ら +たり +その他 +に関する +たち +ます +ん +なら +に対して +特に +せる +及び +これら +とき +では +にて +ほか +ながら +うち +そして +とともに +ただし +かつて +それぞれ +または +お +ほど +ものの +に対する +ほとんど +と共に +といった +です +とも +ところ +ここ +##### End of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_lv.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_lv.txt new file mode 100644 index 0000000000..e21a23c06c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_lv.txt @@ -0,0 +1,172 @@ +# Set of Latvian stopwords from A Stemming Algorithm for Latvian, Karlis Kreslins +# the original list of over 800 forms was refined: +# pronouns, adverbs, interjections were removed +# +# prepositions +aiz +ap +ar +apakš +ārpus +augšpus +bez +caur +dēļ +gar +iekš +iz +kopš +labad +lejpus +līdz +no +otrpus +pa +par +pār +pēc +pie +pirms +pret +priekš +starp +šaipus +uz +viņpus +virs +virspus +zem +apakšpus +# Conjunctions +un +bet +jo +ja +ka +lai +tomēr +tikko +turpretī +arī +kaut +gan +tādēļ +tā +ne +tikvien +vien +kā +ir +te +vai +kamēr +# Particles +ar +diezin +droši +diemžēl +nebūt +ik +it +taču +nu +pat +tiklab +iekšpus +nedz +tik +nevis +turpretim +jeb +iekam +iekām +iekāms +kolīdz +līdzko +tiklīdz +jebšu +tālab +tāpēc +nekā +itin +jā +jau +jel +nē +nezin +tad +tikai +vis +tak +iekams +vien +# modal verbs +būt +biju +biji +bija +bijām +bijāt +esmu +esi +esam +esat +būšu +būsi +būs +būsim +būsiet +tikt +tiku +tiki +tika +tikām +tikāt +tieku +tiec +tiek +tiekam +tiekat +tikšu +tiks +tiksim +tiksiet +tapt +tapi +tapāt +topat +tapšu +tapsi +taps +tapsim +tapsiet +kļūt +kļuvu +kļuvi +kļuva +kļuvām +kļuvāt +kļūstu +kļūsti +kļūst +kļūstam +kļūstat +kļūšu +kļūsi +kļūs +kļūsim +kļūsiet +# verbs +varēt +varēju +varējām +varēšu +varēsim +var +varēji +varējāt +varēsi +varēsiet +varat +varēja +varēs diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_nl.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_nl.txt new file mode 100644 index 0000000000..47a2aeacf6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_nl.txt @@ -0,0 +1,119 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/dutch/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Dutch stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large sample of Dutch text. + + | Dutch stop words frequently exhibit homonym clashes. These are indicated + | clearly below. + +de | the +en | and +van | of, from +ik | I, the ego +te | (1) chez, at etc, (2) to, (3) too +dat | that, which +die | that, those, who, which +in | in, inside +een | a, an, one +hij | he +het | the, it +niet | not, nothing, naught +zijn | (1) to be, being, (2) his, one's, its +is | is +was | (1) was, past tense of all persons sing. of 'zijn' (to be) (2) wax, (3) the washing, (4) rise of river +op | on, upon, at, in, up, used up +aan | on, upon, to (as dative) +met | with, by +als | like, such as, when +voor | (1) before, in front of, (2) furrow +had | had, past tense all persons sing. of 'hebben' (have) +er | there +maar | but, only +om | round, about, for etc +hem | him +dan | then +zou | should/would, past tense all persons sing. of 'zullen' +of | or, whether, if +wat | what, something, anything +mijn | possessive and noun 'mine' +men | people, 'one' +dit | this +zo | so, thus, in this way +door | through by +over | over, across +ze | she, her, they, them +zich | oneself +bij | (1) a bee, (2) by, near, at +ook | also, too +tot | till, until +je | you +mij | me +uit | out of, from +der | Old Dutch form of 'van der' still found in surnames +daar | (1) there, (2) because +haar | (1) her, their, them, (2) hair +naar | (1) unpleasant, unwell etc, (2) towards, (3) as +heb | present first person sing. of 'to have' +hoe | how, why +heeft | present third person sing. of 'to have' +hebben | 'to have' and various parts thereof +deze | this +u | you +want | (1) for, (2) mitten, (3) rigging +nog | yet, still +zal | 'shall', first and third person sing. of verb 'zullen' (will) +me | me +zij | she, they +nu | now +ge | 'thou', still used in Belgium and south Netherlands +geen | none +omdat | because +iets | something, somewhat +worden | to become, grow, get +toch | yet, still +al | all, every, each +waren | (1) 'were' (2) to wander, (3) wares, (3) +veel | much, many +meer | (1) more, (2) lake +doen | to do, to make +toen | then, when +moet | noun 'spot/mote' and present form of 'to must' +ben | (1) am, (2) 'are' in interrogative second person singular of 'to be' +zonder | without +kan | noun 'can' and present form of 'to be able' +hun | their, them +dus | so, consequently +alles | all, everything, anything +onder | under, beneath +ja | yes, of course +eens | once, one day +hier | here +wie | who +werd | imperfect third person sing. of 'become' +altijd | always +doch | yet, but etc +wordt | present third person sing. of 'become' +wezen | (1) to be, (2) 'been' as in 'been fishing', (3) orphans +kunnen | to be able +ons | us/our +zelf | self +tegen | against, towards, at +na | after, near +reeds | already +wil | (1) present tense of 'want', (2) 'will', noun, (3) fender +kon | could; past tense of 'to be able' +niets | nothing +uw | your +iemand | somebody +geweest | been; past participle of 'be' +andere | other diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_no.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_no.txt new file mode 100644 index 0000000000..a7a2c28ba5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_no.txt @@ -0,0 +1,194 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/norwegian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Norwegian stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This stop word list is for the dominant bokmål dialect. Words unique + | to nynorsk are marked *. + + | Revised by Jan Bruusgaard , Jan 2005 + +og | and +i | in +jeg | I +det | it/this/that +at | to (w. inf.) +en | a/an +et | a/an +den | it/this/that +til | to +er | is/am/are +som | who/that +på | on +de | they / you(formal) +med | with +han | he +av | of +ikke | not +ikkje | not * +der | there +så | so +var | was/were +meg | me +seg | you +men | but +ett | one +har | have +om | about +vi | we +min | my +mitt | my +ha | have +hadde | had +hun | she +nå | now +over | over +da | when/as +ved | by/know +fra | from +du | you +ut | out +sin | your +dem | them +oss | us +opp | up +man | you/one +kan | can +hans | his +hvor | where +eller | or +hva | what +skal | shall/must +selv | self (reflective) +sjøl | self (reflective) +her | here +alle | all +vil | will +bli | become +ble | became +blei | became * +blitt | have become +kunne | could +inn | in +når | when +være | be +kom | come +noen | some +noe | some +ville | would +dere | you +som | who/which/that +deres | their/theirs +kun | only/just +ja | yes +etter | after +ned | down +skulle | should +denne | this +for | for/because +deg | you +si | hers/his +sine | hers/his +sitt | hers/his +mot | against +å | to +meget | much +hvorfor | why +dette | this +disse | these/those +uten | without +hvordan | how +ingen | none +din | your +ditt | your +blir | become +samme | same +hvilken | which +hvilke | which (plural) +sånn | such a +inni | inside/within +mellom | between +vår | our +hver | each +hvem | who +vors | us/ours +hvis | whose +både | both +bare | only/just +enn | than +fordi | as/because +før | before +mange | many +også | also +slik | just +vært | been +være | to be +båe | both * +begge | both +siden | since +dykk | your * +dykkar | yours * +dei | they * +deira | them * +deires | theirs * +deim | them * +di | your (fem.) * +då | as/when * +eg | I * +ein | a/an * +eit | a/an * +eitt | a/an * +elles | or * +honom | he * +hjå | at * +ho | she * +hoe | she * +henne | her +hennar | her/hers +hennes | hers +hoss | how * +hossen | how * +ikkje | not * +ingi | noone * +inkje | noone * +korleis | how * +korso | how * +kva | what/which * +kvar | where * +kvarhelst | where * +kven | who/whom * +kvi | why * +kvifor | why * +me | we * +medan | while * +mi | my * +mine | my * +mykje | much * +no | now * +nokon | some (masc./neut.) * +noka | some (fem.) * +nokor | some * +noko | some * +nokre | some * +si | his/hers * +sia | since * +sidan | since * +so | so * +somt | some * +somme | some * +um | about* +upp | up * +vere | be * +vore | was * +verte | become * +vort | become * +varte | became * +vart | became * + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_pt.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_pt.txt new file mode 100644 index 0000000000..acfeb01af6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_pt.txt @@ -0,0 +1,253 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/portuguese/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Portuguese stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + + | The following is a ranked list (commonest to rarest) of stopwords + | deriving from a large sample of text. + + | Extra words have been added at the end. + +de | of, from +a | the; to, at; her +o | the; him +que | who, that +e | and +do | de + o +da | de + a +em | in +um | a +para | for + | é from SER +com | with +não | not, no +uma | a +os | the; them +no | em + o +se | himself etc +na | em + a +por | for +mais | more +as | the; them +dos | de + os +como | as, like +mas | but + | foi from SER +ao | a + o +ele | he +das | de + as + | tem from TER +à | a + a +seu | his +sua | her +ou | or + | ser from SER +quando | when +muito | much + | há from HAV +nos | em + os; us +já | already, now + | está from EST +eu | I +também | also +só | only, just +pelo | per + o +pela | per + a +até | up to +isso | that +ela | he +entre | between + | era from SER +depois | after +sem | without +mesmo | same +aos | a + os + | ter from TER +seus | his +quem | whom +nas | em + as +me | me +esse | that +eles | they + | estão from EST +você | you + | tinha from TER + | foram from SER +essa | that +num | em + um +nem | nor +suas | her +meu | my +às | a + as +minha | my + | têm from TER +numa | em + uma +pelos | per + os +elas | they + | havia from HAV + | seja from SER +qual | which + | será from SER +nós | we + | tenho from TER +lhe | to him, her +deles | of them +essas | those +esses | those +pelas | per + as +este | this + | fosse from SER +dele | of him + + | other words. There are many contractions such as naquele = em+aquele, + | mo = me+o, but they are rare. + | Indefinite article plural forms are also rare. + +tu | thou +te | thee +vocês | you (plural) +vos | you +lhes | to them +meus | my +minhas +teu | thy +tua +teus +tuas +nosso | our +nossa +nossos +nossas + +dela | of her +delas | of them + +esta | this +estes | these +estas | these +aquele | that +aquela | that +aqueles | those +aquelas | those +isto | this +aquilo | that + + | forms of estar, to be (not including the infinitive): +estou +está +estamos +estão +estive +esteve +estivemos +estiveram +estava +estávamos +estavam +estivera +estivéramos +esteja +estejamos +estejam +estivesse +estivéssemos +estivessem +estiver +estivermos +estiverem + + | forms of haver, to have (not including the infinitive): +hei +há +havemos +hão +houve +houvemos +houveram +houvera +houvéramos +haja +hajamos +hajam +houvesse +houvéssemos +houvessem +houver +houvermos +houverem +houverei +houverá +houveremos +houverão +houveria +houveríamos +houveriam + + | forms of ser, to be (not including the infinitive): +sou +somos +são +era +éramos +eram +fui +foi +fomos +foram +fora +fôramos +seja +sejamos +sejam +fosse +fôssemos +fossem +for +formos +forem +serei +será +seremos +serão +seria +seríamos +seriam + + | forms of ter, to have (not including the infinitive): +tenho +tem +temos +tém +tinha +tínhamos +tinham +tive +teve +tivemos +tiveram +tivera +tivéramos +tenha +tenhamos +tenham +tivesse +tivéssemos +tivessem +tiver +tivermos +tiverem +terei +terá +teremos +terão +teria +teríamos +teriam diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ro.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ro.txt new file mode 100644 index 0000000000..4fdee90a5b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ro.txt @@ -0,0 +1,233 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +acea +aceasta +această +aceea +acei +aceia +acel +acela +acele +acelea +acest +acesta +aceste +acestea +aceşti +aceştia +acolo +acum +ai +aia +aibă +aici +al +ăla +ale +alea +ălea +altceva +altcineva +am +ar +are +aş +aşadar +asemenea +asta +ăsta +astăzi +astea +ăstea +ăştia +asupra +aţi +au +avea +avem +aveţi +azi +bine +bucur +bună +ca +că +căci +când +care +cărei +căror +cărui +cât +câte +câţi +către +câtva +ce +cel +ceva +chiar +cînd +cine +cineva +cît +cîte +cîţi +cîtva +contra +cu +cum +cumva +curând +curînd +da +dă +dacă +dar +datorită +de +deci +deja +deoarece +departe +deşi +din +dinaintea +dintr +dintre +drept +după +ea +ei +el +ele +eram +este +eşti +eu +face +fără +fi +fie +fiecare +fii +fim +fiţi +iar +ieri +îi +îl +îmi +împotriva +în +înainte +înaintea +încât +încît +încotro +între +întrucât +întrucît +îţi +la +lângă +le +li +lîngă +lor +lui +mă +mâine +mea +mei +mele +mereu +meu +mi +mine +mult +multă +mulţi +ne +nicăieri +nici +nimeni +nişte +noastră +noastre +noi +noştri +nostru +nu +ori +oricând +oricare +oricât +orice +oricînd +oricine +oricît +oricum +oriunde +până +pe +pentru +peste +pînă +poate +pot +prea +prima +primul +prin +printr +sa +să +săi +sale +sau +său +se +şi +sînt +sîntem +sînteţi +spre +sub +sunt +suntem +sunteţi +ta +tăi +tale +tău +te +ţi +ţie +tine +toată +toate +tot +toţi +totuşi +tu +un +una +unde +undeva +unei +unele +uneori +unor +vă +vi +voastră +voastre +voi +voştri +vostru +vouă +vreo +vreun diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ru.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ru.txt new file mode 100644 index 0000000000..55271400c6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_ru.txt @@ -0,0 +1,243 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/russian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | a russian stop word list. comments begin with vertical bar. each stop + | word is at the start of a line. + + | this is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + | letter `ё' is translated to `е'. + +и | and +в | in/into +во | alternative form +не | not +что | what/that +он | he +на | on/onto +я | i +с | from +со | alternative form +как | how +а | milder form of `no' (but) +то | conjunction and form of `that' +все | all +она | she +так | so, thus +его | him +но | but +да | yes/and +ты | thou +к | towards, by +у | around, chez +же | intensifier particle +вы | you +за | beyond, behind +бы | conditional/subj. particle +по | up to, along +только | only +ее | her +мне | to me +было | it was +вот | here is/are, particle +от | away from +меня | me +еще | still, yet, more +нет | no, there isnt/arent +о | about +из | out of +ему | to him +теперь | now +когда | when +даже | even +ну | so, well +вдруг | suddenly +ли | interrogative particle +если | if +уже | already, but homonym of `narrower' +или | or +ни | neither +быть | to be +был | he was +него | prepositional form of его +до | up to +вас | you accusative +нибудь | indef. suffix preceded by hyphen +опять | again +уж | already, but homonym of `adder' +вам | to you +сказал | he said +ведь | particle `after all' +там | there +потом | then +себя | oneself +ничего | nothing +ей | to her +может | usually with `быть' as `maybe' +они | they +тут | here +где | where +есть | there is/are +надо | got to, must +ней | prepositional form of ей +для | for +мы | we +тебя | thee +их | them, their +чем | than +была | she was +сам | self +чтоб | in order to +без | without +будто | as if +человек | man, person, one +чего | genitive form of `what' +раз | once +тоже | also +себе | to oneself +под | beneath +жизнь | life +будет | will be +ж | short form of intensifer particle `же' +тогда | then +кто | who +этот | this +говорил | was saying +того | genitive form of `that' +потому | for that reason +этого | genitive form of `this' +какой | which +совсем | altogether +ним | prepositional form of `его', `они' +здесь | here +этом | prepositional form of `этот' +один | one +почти | almost +мой | my +тем | instrumental/dative plural of `тот', `то' +чтобы | full form of `in order that' +нее | her (acc.) +кажется | it seems +сейчас | now +были | they were +куда | where to +зачем | why +сказать | to say +всех | all (acc., gen. preposn. plural) +никогда | never +сегодня | today +можно | possible, one can +при | by +наконец | finally +два | two +об | alternative form of `о', about +другой | another +хоть | even +после | after +над | above +больше | more +тот | that one (masc.) +через | across, in +эти | these +нас | us +про | about +всего | in all, only, of all +них | prepositional form of `они' (they) +какая | which, feminine +много | lots +разве | interrogative particle +сказала | she said +три | three +эту | this, acc. fem. sing. +моя | my, feminine +впрочем | moreover, besides +хорошо | good +свою | ones own, acc. fem. sing. +этой | oblique form of `эта', fem. `this' +перед | in front of +иногда | sometimes +лучше | better +чуть | a little +том | preposn. form of `that one' +нельзя | one must not +такой | such a one +им | to them +более | more +всегда | always +конечно | of course +всю | acc. fem. sing of `all' +между | between + + + | b: some paradigms + | + | personal pronouns + | + | я меня мне мной [мною] + | ты тебя тебе тобой [тобою] + | он его ему им [него, нему, ним] + | она ее эи ею [нее, нэи, нею] + | оно его ему им [него, нему, ним] + | + | мы нас нам нами + | вы вас вам вами + | они их им ими [них, ним, ними] + | + | себя себе собой [собою] + | + | demonstrative pronouns: этот (this), тот (that) + | + | этот эта это эти + | этого эты это эти + | этого этой этого этих + | этому этой этому этим + | этим этой этим [этою] этими + | этом этой этом этих + | + | тот та то те + | того ту то те + | того той того тех + | тому той тому тем + | тем той тем [тою] теми + | том той том тех + | + | determinative pronouns + | + | (a) весь (all) + | + | весь вся все все + | всего всю все все + | всего всей всего всех + | всему всей всему всем + | всем всей всем [всею] всеми + | всем всей всем всех + | + | (b) сам (himself etc) + | + | сам сама само сами + | самого саму само самих + | самого самой самого самих + | самому самой самому самим + | самим самой самим [самою] самими + | самом самой самом самих + | + | stems of verbs `to be', `to have', `to do' and modal + | + | быть бы буд быв есть суть + | име + | дел + | мог мож мочь + | уме + | хоч хот + | долж + | можн + | нужн + | нельзя + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_sv.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_sv.txt new file mode 100644 index 0000000000..096f87f676 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_sv.txt @@ -0,0 +1,133 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/swedish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Swedish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + | Swedish stop words occasionally exhibit homonym clashes. For example + | så = so, but also seed. These are indicated clearly below. + +och | and +det | it, this/that +att | to (with infinitive) +i | in, at +en | a +jag | I +hon | she +som | who, that +han | he +på | on +den | it, this/that +med | with +var | where, each +sig | him(self) etc +för | for +så | so (also: seed) +till | to +är | is +men | but +ett | a +om | if; around, about +hade | had +de | they, these/those +av | of +icke | not, no +mig | me +du | you +henne | her +då | then, when +sin | his +nu | now +har | have +inte | inte någon = no one +hans | his +honom | him +skulle | 'sake' +hennes | her +där | there +min | my +man | one (pronoun) +ej | nor +vid | at, by, on (also: vast) +kunde | could +något | some etc +från | from, off +ut | out +när | when +efter | after, behind +upp | up +vi | we +dem | them +vara | be +vad | what +över | over +än | than +dig | you +kan | can +sina | his +här | here +ha | have +mot | towards +alla | all +under | under (also: wonder) +någon | some etc +eller | or (else) +allt | all +mycket | much +sedan | since +ju | why +denna | this/that +själv | myself, yourself etc +detta | this/that +åt | to +utan | without +varit | was +hur | how +ingen | no +mitt | my +ni | you +bli | to be, become +blev | from bli +oss | us +din | thy +dessa | these/those +några | some etc +deras | their +blir | from bli +mina | my +samma | (the) same +vilken | who, that +er | you, your +sådan | such a +vår | our +blivit | from bli +dess | its +inom | within +mellan | between +sådant | such a +varför | why +varje | each +vilka | who, that +ditt | thy +vem | who +vilket | who, that +sitta | his +sådana | such a +vart | each +dina | thy +vars | whose +vårt | our +våra | our +ert | your +era | your +vilkas | whose + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_th.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_th.txt new file mode 100644 index 0000000000..07f0fabe69 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_th.txt @@ -0,0 +1,119 @@ +# Thai stopwords from: +# "Opinion Detection in Thai Political News Columns +# Based on Subjectivity Analysis" +# Khampol Sukhum, Supot Nitsuwat, and Choochart Haruechaiyasak +ไว้ +ไม่ +ไป +ได้ +ให้ +ใน +โดย +แห่ง +แล้ว +และ +แรก +แบบ +แต่ +เอง +เห็น +เลย +เริ่ม +เรา +เมื่อ +เพื่อ +เพราะ +เป็นการ +เป็น +เปิดเผย +เปิด +เนื่องจาก +เดียวกัน +เดียว +เช่น +เฉพาะ +เคย +เข้า +เขา +อีก +อาจ +อะไร +ออก +อย่าง +อยู่ +อยาก +หาก +หลาย +หลังจาก +หลัง +หรือ +หนึ่ง +ส่วน +ส่ง +สุด +สําหรับ +ว่า +วัน +ลง +ร่วม +ราย +รับ +ระหว่าง +รวม +ยัง +มี +มาก +มา +พร้อม +พบ +ผ่าน +ผล +บาง +น่า +นี้ +นํา +นั้น +นัก +นอกจาก +ทุก +ที่สุด +ที่ +ทําให้ +ทํา +ทาง +ทั้งนี้ +ทั้ง +ถ้า +ถูก +ถึง +ต้อง +ต่างๆ +ต่าง +ต่อ +ตาม +ตั้งแต่ +ตั้ง +ด้าน +ด้วย +ดัง +ซึ่ง +ช่วง +จึง +จาก +จัด +จะ +คือ +ความ +ครั้ง +คง +ขึ้น +ของ +ขอ +ขณะ +ก่อน +ก็ +การ +กับ +กัน +กว่า +กล่าว diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_tr.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_tr.txt new file mode 100644 index 0000000000..84d9408d4e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/stopwords_tr.txt @@ -0,0 +1,212 @@ +# Turkish stopwords from LUCENE-559 +# merged with the list from "Information Retrieval on Turkish Texts" +# (http://www.users.muohio.edu/canf/papers/JASIST2008offPrint.pdf) +acaba +altmış +altı +ama +ancak +arada +aslında +ayrıca +bana +bazı +belki +ben +benden +beni +benim +beri +beş +bile +bin +bir +birçok +biri +birkaç +birkez +birşey +birşeyi +biz +bize +bizden +bizi +bizim +böyle +böylece +bu +buna +bunda +bundan +bunlar +bunları +bunların +bunu +bunun +burada +çok +çünkü +da +daha +dahi +de +defa +değil +diğer +diye +doksan +dokuz +dolayı +dolayısıyla +dört +edecek +eden +ederek +edilecek +ediliyor +edilmesi +ediyor +eğer +elli +en +etmesi +etti +ettiği +ettiğini +gibi +göre +halen +hangi +hatta +hem +henüz +hep +hepsi +her +herhangi +herkesin +hiç +hiçbir +için +iki +ile +ilgili +ise +işte +itibaren +itibariyle +kadar +karşın +katrilyon +kendi +kendilerine +kendini +kendisi +kendisine +kendisini +kez +ki +kim +kimden +kime +kimi +kimse +kırk +milyar +milyon +mu +mü +mı +nasıl +ne +neden +nedenle +nerde +nerede +nereye +niye +niçin +o +olan +olarak +oldu +olduğu +olduğunu +olduklarını +olmadı +olmadığı +olmak +olması +olmayan +olmaz +olsa +olsun +olup +olur +olursa +oluyor +on +ona +ondan +onlar +onlardan +onları +onların +onu +onun +otuz +oysa +öyle +pek +rağmen +sadece +sanki +sekiz +seksen +sen +senden +seni +senin +siz +sizden +sizi +sizin +şey +şeyden +şeyi +şeyler +şöyle +şu +şuna +şunda +şundan +şunları +şunu +tarafından +trilyon +tüm +üç +üzere +var +vardı +ve +veya +ya +yani +yapacak +yapılan +yapılması +yapıyor +yapmak +yaptı +yaptığı +yaptığını +yaptıkları +yedi +yerine +yetmiş +yine +yirmi +yoksa +yüz +zaten diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/userdict_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/userdict_ja.txt new file mode 100644 index 0000000000..6f0368e4d8 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/lang/userdict_ja.txt @@ -0,0 +1,29 @@ +# +# This is a sample user dictionary for Kuromoji (JapaneseTokenizer) +# +# Add entries to this file in order to override the statistical model in terms +# of segmentation, readings and part-of-speech tags. Notice that entries do +# not have weights since they are always used when found. This is by-design +# in order to maximize ease-of-use. +# +# Entries are defined using the following CSV format: +# , ... , ... , +# +# Notice that a single half-width space separates tokens and readings, and +# that the number tokens and readings must match exactly. +# +# Also notice that multiple entries with the same is undefined. +# +# Whitespace only lines are ignored. Comments are not allowed on entry lines. +# + +# Custom segmentation for kanji compounds +日本経済新聞,日本 経済 新聞,ニホン ケイザイ シンブン,カスタム名詞 +関西国際空港,関西 国際 空港,カンサイ コクサイ クウコウ,カスタム名詞 + +# Custom segmentation for compound katakana +トートバッグ,トート バッグ,トート バッグ,かずカナ名詞 +ショルダーバッグ,ショルダー バッグ,ショルダー バッグ,かずカナ名詞 + +# Custom reading for former sumo wrestler +朝青龍,朝青龍,アサショウリュウ,カスタム人名 diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/managed-schema b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/managed-schema new file mode 100644 index 0000000000..95a9027856 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/managed-schema @@ -0,0 +1,1005 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/params.json b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/params.json new file mode 100644 index 0000000000..06114ef257 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/params.json @@ -0,0 +1,20 @@ +{"params":{ + "query":{ + "defType":"edismax", + "q.alt":"*:*", + "rows":"10", + "fl":"*,score", + "":{"v":0} + }, + "facets":{ + "facet":"on", + "facet.mincount": "1", + "":{"v":0} + }, + "velocity":{ + "wt": "velocity", + "v.template":"browse", + "v.layout": "layout", + "":{"v":0} + } +}} \ No newline at end of file diff --git a/KeywordSearch/release/solr/solr/conf/protwords.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/protwords.txt similarity index 100% rename from KeywordSearch/release/solr/solr/conf/protwords.txt rename to KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/protwords.txt diff --git a/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml new file mode 100644 index 0000000000..c083073b58 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml @@ -0,0 +1,1484 @@ + + + + + + + + + 6.2.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + + 1024 + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + 20 + + + 200 + + + + + + + + + + + + + + + + false + + + 2 + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + + + + true + ignored_ + _text_ + + + + + + + + + + + + + + explicit + true + + + + + + + + + text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + + string + elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + yyyy-MM-dd'T'HH:mm:ss.SSSZ + yyyy-MM-dd'T'HH:mm:ss,SSSZ + yyyy-MM-dd'T'HH:mm:ss.SSS + yyyy-MM-dd'T'HH:mm:ss,SSS + yyyy-MM-dd'T'HH:mm:ssZ + yyyy-MM-dd'T'HH:mm:ss + yyyy-MM-dd'T'HH:mmZ + yyyy-MM-dd'T'HH:mm + yyyy-MM-dd HH:mm:ss.SSSZ + yyyy-MM-dd HH:mm:ss,SSSZ + yyyy-MM-dd HH:mm:ss.SSS + yyyy-MM-dd HH:mm:ss,SSS + yyyy-MM-dd HH:mm:ssZ + yyyy-MM-dd HH:mm:ss + yyyy-MM-dd HH:mmZ + yyyy-MM-dd HH:mm + yyyy-MM-dd + + + + strings + + java.lang.Boolean + booleans + + + java.util.Date + tdates + + + java.lang.Long + java.lang.Integer + tlongs + + + java.lang.Number + tdoubles + + + + + + + + + + + + + + + + + + + + + text/plain; charset=UTF-8 + + + + + ${velocity.template.base.dir:} + ${velocity.solr.resource.loader.enabled:true} + ${velocity.params.resource.loader.enabled:false} + + + + + 5 + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/solr/conf/stopwords.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/stopwords.txt similarity index 100% rename from KeywordSearch/release/solr/solr/conf/stopwords.txt rename to KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/stopwords.txt diff --git a/KeywordSearch/release/solr/solr/conf/synonyms.txt b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/synonyms.txt similarity index 98% rename from KeywordSearch/release/solr/solr/conf/synonyms.txt rename to KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/synonyms.txt index 5c3b95fb6a..7f72128303 100644 --- a/KeywordSearch/release/solr/solr/conf/synonyms.txt +++ b/KeywordSearch/release/solr/server/solr/configsets/basic_configs/conf/synonyms.txt @@ -27,5 +27,3 @@ Television, Televisions, TV, TVs # Synonym mappings can be used for spelling correction too pixima => pixma -a\,a => b\,b - diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/currency.xml b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/currency.xml new file mode 100644 index 0000000000..3a9c58afee --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/currency.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/elevate.xml b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/elevate.xml new file mode 100644 index 0000000000..2c09ebed66 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/elevate.xml @@ -0,0 +1,42 @@ + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_ca.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_ca.txt new file mode 100644 index 0000000000..307a85f913 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_ca.txt @@ -0,0 +1,8 @@ +# Set of Catalan contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +d +l +m +n +s +t diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_fr.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_fr.txt new file mode 100644 index 0000000000..f1bba51b23 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_fr.txt @@ -0,0 +1,15 @@ +# Set of French contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +l +m +t +qu +n +s +j +d +c +jusqu +quoiqu +lorsqu +puisqu diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_ga.txt new file mode 100644 index 0000000000..9ebe7fa349 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_ga.txt @@ -0,0 +1,5 @@ +# Set of Irish contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +d +m +b diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_it.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_it.txt new file mode 100644 index 0000000000..cac0409537 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/contractions_it.txt @@ -0,0 +1,23 @@ +# Set of Italian contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +c +l +all +dall +dell +nell +sull +coll +pell +gl +agl +dagl +degl +negl +sugl +un +m +t +s +v +d diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/hyphenations_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/hyphenations_ga.txt new file mode 100644 index 0000000000..4d2642cc5a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/hyphenations_ga.txt @@ -0,0 +1,5 @@ +# Set of Irish hyphenations for StopFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +h +n +t diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stemdict_nl.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stemdict_nl.txt new file mode 100644 index 0000000000..441072971d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stemdict_nl.txt @@ -0,0 +1,6 @@ +# Set of overrides for the dutch stemmer +# TODO: load this as a resource from the analyzer and sync it in build.xml +fiets fiets +bromfiets bromfiets +ei eier +kind kinder diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stoptags_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stoptags_ja.txt new file mode 100644 index 0000000000..71b750845e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stoptags_ja.txt @@ -0,0 +1,420 @@ +# +# This file defines a Japanese stoptag set for JapanesePartOfSpeechStopFilter. +# +# Any token with a part-of-speech tag that exactly matches those defined in this +# file are removed from the token stream. +# +# Set your own stoptags by uncommenting the lines below. Note that comments are +# not allowed on the same line as a stoptag. See LUCENE-3745 for frequency lists, +# etc. that can be useful for building you own stoptag set. +# +# The entire possible tagset is provided below for convenience. +# +##### +# noun: unclassified nouns +#名詞 +# +# noun-common: Common nouns or nouns where the sub-classification is undefined +#名詞-一般 +# +# noun-proper: Proper nouns where the sub-classification is undefined +#名詞-固有名詞 +# +# noun-proper-misc: miscellaneous proper nouns +#名詞-固有名詞-一般 +# +# noun-proper-person: Personal names where the sub-classification is undefined +#名詞-固有名詞-人名 +# +# noun-proper-person-misc: names that cannot be divided into surname and +# given name; foreign names; names where the surname or given name is unknown. +# e.g. お市の方 +#名詞-固有名詞-人名-一般 +# +# noun-proper-person-surname: Mainly Japanese surnames. +# e.g. 山田 +#名詞-固有名詞-人名-姓 +# +# noun-proper-person-given_name: Mainly Japanese given names. +# e.g. 太郎 +#名詞-固有名詞-人名-名 +# +# noun-proper-organization: Names representing organizations. +# e.g. 通産省, NHK +#名詞-固有名詞-組織 +# +# noun-proper-place: Place names where the sub-classification is undefined +#名詞-固有名詞-地域 +# +# noun-proper-place-misc: Place names excluding countries. +# e.g. アジア, バルセロナ, 京都 +#名詞-固有名詞-地域-一般 +# +# noun-proper-place-country: Country names. +# e.g. 日本, オーストラリア +#名詞-固有名詞-地域-国 +# +# noun-pronoun: Pronouns where the sub-classification is undefined +#名詞-代名詞 +# +# noun-pronoun-misc: miscellaneous pronouns: +# e.g. それ, ここ, あいつ, あなた, あちこち, いくつ, どこか, なに, みなさん, みんな, わたくし, われわれ +#名詞-代名詞-一般 +# +# noun-pronoun-contraction: Spoken language contraction made by combining a +# pronoun and the particle 'wa'. +# e.g. ありゃ, こりゃ, こりゃあ, そりゃ, そりゃあ +#名詞-代名詞-縮約 +# +# noun-adverbial: Temporal nouns such as names of days or months that behave +# like adverbs. Nouns that represent amount or ratios and can be used adverbially, +# e.g. 金曜, 一月, 午後, 少量 +#名詞-副詞可能 +# +# noun-verbal: Nouns that take arguments with case and can appear followed by +# 'suru' and related verbs (する, できる, なさる, くださる) +# e.g. インプット, 愛着, 悪化, 悪戦苦闘, 一安心, 下取り +#名詞-サ変接続 +# +# noun-adjective-base: The base form of adjectives, words that appear before な ("na") +# e.g. 健康, 安易, 駄目, だめ +#名詞-形容動詞語幹 +# +# noun-numeric: Arabic numbers, Chinese numerals, and counters like 何 (回), 数. +# e.g. 0, 1, 2, 何, 数, 幾 +#名詞-数 +# +# noun-affix: noun affixes where the sub-classification is undefined +#名詞-非自立 +# +# noun-affix-misc: Of adnominalizers, the case-marker の ("no"), and words that +# attach to the base form of inflectional words, words that cannot be classified +# into any of the other categories below. This category includes indefinite nouns. +# e.g. あかつき, 暁, かい, 甲斐, 気, きらい, 嫌い, くせ, 癖, こと, 事, ごと, 毎, しだい, 次第, +# 順, せい, 所為, ついで, 序で, つもり, 積もり, 点, どころ, の, はず, 筈, はずみ, 弾み, +# 拍子, ふう, ふり, 振り, ほう, 方, 旨, もの, 物, 者, ゆえ, 故, ゆえん, 所以, わけ, 訳, +# わり, 割り, 割, ん-口語/, もん-口語/ +#名詞-非自立-一般 +# +# noun-affix-adverbial: noun affixes that that can behave as adverbs. +# e.g. あいだ, 間, あげく, 挙げ句, あと, 後, 余り, 以外, 以降, 以後, 以上, 以前, 一方, うえ, +# 上, うち, 内, おり, 折り, かぎり, 限り, きり, っきり, 結果, ころ, 頃, さい, 際, 最中, さなか, +# 最中, じたい, 自体, たび, 度, ため, 為, つど, 都度, とおり, 通り, とき, 時, ところ, 所, +# とたん, 途端, なか, 中, のち, 後, ばあい, 場合, 日, ぶん, 分, ほか, 他, まえ, 前, まま, +# 儘, 侭, みぎり, 矢先 +#名詞-非自立-副詞可能 +# +# noun-affix-aux: noun affixes treated as 助動詞 ("auxiliary verb") in school grammars +# with the stem よう(だ) ("you(da)"). +# e.g. よう, やう, 様 (よう) +#名詞-非自立-助動詞語幹 +# +# noun-affix-adjective-base: noun affixes that can connect to the indeclinable +# connection form な (aux "da"). +# e.g. みたい, ふう +#名詞-非自立-形容動詞語幹 +# +# noun-special: special nouns where the sub-classification is undefined. +#名詞-特殊 +# +# noun-special-aux: The そうだ ("souda") stem form that is used for reporting news, is +# treated as 助動詞 ("auxiliary verb") in school grammars, and attach to the base +# form of inflectional words. +# e.g. そう +#名詞-特殊-助動詞語幹 +# +# noun-suffix: noun suffixes where the sub-classification is undefined. +#名詞-接尾 +# +# noun-suffix-misc: Of the nouns or stem forms of other parts of speech that connect +# to ガル or タイ and can combine into compound nouns, words that cannot be classified into +# any of the other categories below. In general, this category is more inclusive than +# 接尾語 ("suffix") and is usually the last element in a compound noun. +# e.g. おき, かた, 方, 甲斐 (がい), がかり, ぎみ, 気味, ぐるみ, (~した) さ, 次第, 済 (ず) み, +# よう, (でき)っこ, 感, 観, 性, 学, 類, 面, 用 +#名詞-接尾-一般 +# +# noun-suffix-person: Suffixes that form nouns and attach to person names more often +# than other nouns. +# e.g. 君, 様, 著 +#名詞-接尾-人名 +# +# noun-suffix-place: Suffixes that form nouns and attach to place names more often +# than other nouns. +# e.g. 町, 市, 県 +#名詞-接尾-地域 +# +# noun-suffix-verbal: Of the suffixes that attach to nouns and form nouns, those that +# can appear before スル ("suru"). +# e.g. 化, 視, 分け, 入り, 落ち, 買い +#名詞-接尾-サ変接続 +# +# noun-suffix-aux: The stem form of そうだ (様態) that is used to indicate conditions, +# is treated as 助動詞 ("auxiliary verb") in school grammars, and attach to the +# conjunctive form of inflectional words. +# e.g. そう +#名詞-接尾-助動詞語幹 +# +# noun-suffix-adjective-base: Suffixes that attach to other nouns or the conjunctive +# form of inflectional words and appear before the copula だ ("da"). +# e.g. 的, げ, がち +#名詞-接尾-形容動詞語幹 +# +# noun-suffix-adverbial: Suffixes that attach to other nouns and can behave as adverbs. +# e.g. 後 (ご), 以後, 以降, 以前, 前後, 中, 末, 上, 時 (じ) +#名詞-接尾-副詞可能 +# +# noun-suffix-classifier: Suffixes that attach to numbers and form nouns. This category +# is more inclusive than 助数詞 ("classifier") and includes common nouns that attach +# to numbers. +# e.g. 個, つ, 本, 冊, パーセント, cm, kg, カ月, か国, 区画, 時間, 時半 +#名詞-接尾-助数詞 +# +# noun-suffix-special: Special suffixes that mainly attach to inflecting words. +# e.g. (楽し) さ, (考え) 方 +#名詞-接尾-特殊 +# +# noun-suffix-conjunctive: Nouns that behave like conjunctions and join two words +# together. +# e.g. (日本) 対 (アメリカ), 対 (アメリカ), (3) 対 (5), (女優) 兼 (主婦) +#名詞-接続詞的 +# +# noun-verbal_aux: Nouns that attach to the conjunctive particle て ("te") and are +# semantically verb-like. +# e.g. ごらん, ご覧, 御覧, 頂戴 +#名詞-動詞非自立的 +# +# noun-quotation: text that cannot be segmented into words, proverbs, Chinese poetry, +# dialects, English, etc. Currently, the only entry for 名詞 引用文字列 ("noun quotation") +# is いわく ("iwaku"). +#名詞-引用文字列 +# +# noun-nai_adjective: Words that appear before the auxiliary verb ない ("nai") and +# behave like an adjective. +# e.g. 申し訳, 仕方, とんでも, 違い +#名詞-ナイ形容詞語幹 +# +##### +# prefix: unclassified prefixes +#接頭詞 +# +# prefix-nominal: Prefixes that attach to nouns (including adjective stem forms) +# excluding numerical expressions. +# e.g. お (水), 某 (氏), 同 (社), 故 (~氏), 高 (品質), お (見事), ご (立派) +#接頭詞-名詞接続 +# +# prefix-verbal: Prefixes that attach to the imperative form of a verb or a verb +# in conjunctive form followed by なる/なさる/くださる. +# e.g. お (読みなさい), お (座り) +#接頭詞-動詞接続 +# +# prefix-adjectival: Prefixes that attach to adjectives. +# e.g. お (寒いですねえ), バカ (でかい) +#接頭詞-形容詞接続 +# +# prefix-numerical: Prefixes that attach to numerical expressions. +# e.g. 約, およそ, 毎時 +#接頭詞-数接続 +# +##### +# verb: unclassified verbs +#動詞 +# +# verb-main: +#動詞-自立 +# +# verb-auxiliary: +#動詞-非自立 +# +# verb-suffix: +#動詞-接尾 +# +##### +# adjective: unclassified adjectives +#形容詞 +# +# adjective-main: +#形容詞-自立 +# +# adjective-auxiliary: +#形容詞-非自立 +# +# adjective-suffix: +#形容詞-接尾 +# +##### +# adverb: unclassified adverbs +#副詞 +# +# adverb-misc: Words that can be segmented into one unit and where adnominal +# modification is not possible. +# e.g. あいかわらず, 多分 +#副詞-一般 +# +# adverb-particle_conjunction: Adverbs that can be followed by の, は, に, +# な, する, だ, etc. +# e.g. こんなに, そんなに, あんなに, なにか, なんでも +#副詞-助詞類接続 +# +##### +# adnominal: Words that only have noun-modifying forms. +# e.g. この, その, あの, どの, いわゆる, なんらかの, 何らかの, いろんな, こういう, そういう, ああいう, +# どういう, こんな, そんな, あんな, どんな, 大きな, 小さな, おかしな, ほんの, たいした, +# 「(, も) さる (ことながら)」, 微々たる, 堂々たる, 単なる, いかなる, 我が」「同じ, 亡き +#連体詞 +# +##### +# conjunction: Conjunctions that can occur independently. +# e.g. が, けれども, そして, じゃあ, それどころか +接続詞 +# +##### +# particle: unclassified particles. +助詞 +# +# particle-case: case particles where the subclassification is undefined. +助詞-格助詞 +# +# particle-case-misc: Case particles. +# e.g. から, が, で, と, に, へ, より, を, の, にて +助詞-格助詞-一般 +# +# particle-case-quote: the "to" that appears after nouns, a person’s speech, +# quotation marks, expressions of decisions from a meeting, reasons, judgements, +# conjectures, etc. +# e.g. ( だ) と (述べた.), ( である) と (して執行猶予...) +助詞-格助詞-引用 +# +# particle-case-compound: Compounds of particles and verbs that mainly behave +# like case particles. +# e.g. という, といった, とかいう, として, とともに, と共に, でもって, にあたって, に当たって, に当って, +# にあたり, に当たり, に当り, に当たる, にあたる, において, に於いて,に於て, における, に於ける, +# にかけ, にかけて, にかんし, に関し, にかんして, に関して, にかんする, に関する, に際し, +# に際して, にしたがい, に従い, に従う, にしたがって, に従って, にたいし, に対し, にたいして, +# に対して, にたいする, に対する, について, につき, につけ, につけて, につれ, につれて, にとって, +# にとり, にまつわる, によって, に依って, に因って, により, に依り, に因り, による, に依る, に因る, +# にわたって, にわたる, をもって, を以って, を通じ, を通じて, を通して, をめぐって, をめぐり, をめぐる, +# って-口語/, ちゅう-関西弁「という」/, (何) ていう (人)-口語/, っていう-口語/, といふ, とかいふ +助詞-格助詞-連語 +# +# particle-conjunctive: +# e.g. から, からには, が, けれど, けれども, けど, し, つつ, て, で, と, ところが, どころか, とも, ども, +# ながら, なり, ので, のに, ば, ものの, や ( した), やいなや, (ころん) じゃ(いけない)-口語/, +# (行っ) ちゃ(いけない)-口語/, (言っ) たって (しかたがない)-口語/, (それがなく)ったって (平気)-口語/ +助詞-接続助詞 +# +# particle-dependency: +# e.g. こそ, さえ, しか, すら, は, も, ぞ +助詞-係助詞 +# +# particle-adverbial: +# e.g. がてら, かも, くらい, 位, ぐらい, しも, (学校) じゃ(これが流行っている)-口語/, +# (それ)じゃあ (よくない)-口語/, ずつ, (私) なぞ, など, (私) なり (に), (先生) なんか (大嫌い)-口語/, +# (私) なんぞ, (先生) なんて (大嫌い)-口語/, のみ, だけ, (私) だって-口語/, だに, +# (彼)ったら-口語/, (お茶) でも (いかが), 等 (とう), (今後) とも, ばかり, ばっか-口語/, ばっかり-口語/, +# ほど, 程, まで, 迄, (誰) も (が)([助詞-格助詞] および [助詞-係助詞] の前に位置する「も」) +助詞-副助詞 +# +# particle-interjective: particles with interjective grammatical roles. +# e.g. (松島) や +助詞-間投助詞 +# +# particle-coordinate: +# e.g. と, たり, だの, だり, とか, なり, や, やら +助詞-並立助詞 +# +# particle-final: +# e.g. かい, かしら, さ, ぜ, (だ)っけ-口語/, (とまってる) で-方言/, な, ナ, なあ-口語/, ぞ, ね, ネ, +# ねぇ-口語/, ねえ-口語/, ねん-方言/, の, のう-口語/, や, よ, ヨ, よぉ-口語/, わ, わい-口語/ +助詞-終助詞 +# +# particle-adverbial/conjunctive/final: The particle "ka" when unknown whether it is +# adverbial, conjunctive, or sentence final. For example: +# (a) 「A か B か」. Ex:「(国内で運用する) か,(海外で運用する) か (.)」 +# (b) Inside an adverb phrase. Ex:「(幸いという) か (, 死者はいなかった.)」 +# 「(祈りが届いたせい) か (, 試験に合格した.)」 +# (c) 「かのように」. Ex:「(何もなかった) か (のように振る舞った.)」 +# e.g. か +助詞-副助詞/並立助詞/終助詞 +# +# particle-adnominalizer: The "no" that attaches to nouns and modifies +# non-inflectional words. +助詞-連体化 +# +# particle-adnominalizer: The "ni" and "to" that appear following nouns and adverbs +# that are giongo, giseigo, or gitaigo. +# e.g. に, と +助詞-副詞化 +# +# particle-special: A particle that does not fit into one of the above classifications. +# This includes particles that are used in Tanka, Haiku, and other poetry. +# e.g. かな, けむ, ( しただろう) に, (あんた) にゃ(わからん), (俺) ん (家) +助詞-特殊 +# +##### +# auxiliary-verb: +助動詞 +# +##### +# interjection: Greetings and other exclamations. +# e.g. おはよう, おはようございます, こんにちは, こんばんは, ありがとう, どうもありがとう, ありがとうございます, +# いただきます, ごちそうさま, さよなら, さようなら, はい, いいえ, ごめん, ごめんなさい +#感動詞 +# +##### +# symbol: unclassified Symbols. +記号 +# +# symbol-misc: A general symbol not in one of the categories below. +# e.g. [○◎@$〒→+] +記号-一般 +# +# symbol-comma: Commas +# e.g. [,、] +記号-読点 +# +# symbol-period: Periods and full stops. +# e.g. [..。] +記号-句点 +# +# symbol-space: Full-width whitespace. +記号-空白 +# +# symbol-open_bracket: +# e.g. [({‘“『【] +記号-括弧開 +# +# symbol-close_bracket: +# e.g. [)}’”』」】] +記号-括弧閉 +# +# symbol-alphabetic: +#記号-アルファベット +# +##### +# other: unclassified other +#その他 +# +# other-interjection: Words that are hard to classify as noun-suffixes or +# sentence-final particles. +# e.g. (だ)ァ +その他-間投 +# +##### +# filler: Aizuchi that occurs during a conversation or sounds inserted as filler. +# e.g. あの, うんと, えと +フィラー +# +##### +# non-verbal: non-verbal sound. +非言語音 +# +##### +# fragment: +#語断片 +# +##### +# unknown: unknown part of speech. +#未知語 +# +##### End of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ar.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ar.txt new file mode 100644 index 0000000000..046829db6a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ar.txt @@ -0,0 +1,125 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +# Cleaned on October 11, 2009 (not normalized, so use before normalization) +# This means that when modifying this list, you might need to add some +# redundant entries, for example containing forms with both أ and ا +من +ومن +منها +منه +في +وفي +فيها +فيه +و +ف +ثم +او +أو +ب +بها +به +ا +أ +اى +اي +أي +أى +لا +ولا +الا +ألا +إلا +لكن +ما +وما +كما +فما +عن +مع +اذا +إذا +ان +أن +إن +انها +أنها +إنها +انه +أنه +إنه +بان +بأن +فان +فأن +وان +وأن +وإن +التى +التي +الذى +الذي +الذين +الى +الي +إلى +إلي +على +عليها +عليه +اما +أما +إما +ايضا +أيضا +كل +وكل +لم +ولم +لن +ولن +هى +هي +هو +وهى +وهي +وهو +فهى +فهي +فهو +انت +أنت +لك +لها +له +هذه +هذا +تلك +ذلك +هناك +كانت +كان +يكون +تكون +وكانت +وكان +غير +بعض +قد +نحو +بين +بينما +منذ +ضمن +حيث +الان +الآن +خلال +بعد +قبل +حتى +عند +عندما +لدى +جميع diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_bg.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_bg.txt new file mode 100644 index 0000000000..1ae4ba2ae3 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_bg.txt @@ -0,0 +1,193 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +а +аз +ако +ала +бе +без +беше +би +бил +била +били +било +близо +бъдат +бъде +бяха +в +вас +ваш +ваша +вероятно +вече +взема +ви +вие +винаги +все +всеки +всички +всичко +всяка +във +въпреки +върху +г +ги +главно +го +д +да +дали +до +докато +докога +дори +досега +доста +е +едва +един +ето +за +зад +заедно +заради +засега +затова +защо +защото +и +из +или +им +има +имат +иска +й +каза +как +каква +какво +както +какъв +като +кога +когато +което +които +кой +който +колко +която +къде +където +към +ли +м +ме +между +мен +ми +мнозина +мога +могат +може +моля +момента +му +н +на +над +назад +най +направи +напред +например +нас +не +него +нея +ни +ние +никой +нито +но +някои +някой +няма +обаче +около +освен +особено +от +отгоре +отново +още +пак +по +повече +повечето +под +поне +поради +после +почти +прави +пред +преди +през +при +пък +първо +с +са +само +се +сега +си +скоро +след +сме +според +сред +срещу +сте +съм +със +също +т +тази +така +такива +такъв +там +твой +те +тези +ти +тн +то +това +тогава +този +той +толкова +точно +трябва +тук +тъй +тя +тях +у +харесва +ч +че +често +чрез +ще +щом +я diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ca.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ca.txt new file mode 100644 index 0000000000..3da65deafe --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ca.txt @@ -0,0 +1,220 @@ +# Catalan stopwords from http://github.com/vcl/cue.language (Apache 2 Licensed) +a +abans +ací +ah +així +això +al +als +aleshores +algun +alguna +algunes +alguns +alhora +allà +allí +allò +altra +altre +altres +amb +ambdós +ambdues +apa +aquell +aquella +aquelles +aquells +aquest +aquesta +aquestes +aquests +aquí +baix +cada +cadascú +cadascuna +cadascunes +cadascuns +com +contra +d'un +d'una +d'unes +d'uns +dalt +de +del +dels +des +després +dins +dintre +donat +doncs +durant +e +eh +el +els +em +en +encara +ens +entre +érem +eren +éreu +es +és +esta +està +estàvem +estaven +estàveu +esteu +et +etc +ets +fins +fora +gairebé +ha +han +has +havia +he +hem +heu +hi +ho +i +igual +iguals +ja +l'hi +la +les +li +li'n +llavors +m'he +ma +mal +malgrat +mateix +mateixa +mateixes +mateixos +me +mentre +més +meu +meus +meva +meves +molt +molta +moltes +molts +mon +mons +n'he +n'hi +ne +ni +no +nogensmenys +només +nosaltres +nostra +nostre +nostres +o +oh +oi +on +pas +pel +pels +per +però +perquè +poc +poca +pocs +poques +potser +propi +qual +quals +quan +quant +que +què +quelcom +qui +quin +quina +quines +quins +s'ha +s'han +sa +semblant +semblants +ses +seu +seus +seva +seva +seves +si +sobre +sobretot +sóc +solament +sols +son +són +sons +sota +sou +t'ha +t'han +t'he +ta +tal +també +tampoc +tan +tant +tanta +tantes +teu +teus +teva +teves +ton +tons +tot +tota +totes +tots +un +una +unes +uns +us +va +vaig +vam +van +vas +veu +vosaltres +vostra +vostre +vostres diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_cz.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_cz.txt new file mode 100644 index 0000000000..53c6097dac --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_cz.txt @@ -0,0 +1,172 @@ +a +s +k +o +i +u +v +z +dnes +cz +tímto +budeš +budem +byli +jseš +můj +svým +ta +tomto +tohle +tuto +tyto +jej +zda +proč +máte +tato +kam +tohoto +kdo +kteří +mi +nám +tom +tomuto +mít +nic +proto +kterou +byla +toho +protože +asi +ho +naši +napište +re +což +tím +takže +svých +její +svými +jste +aj +tu +tedy +teto +bylo +kde +ke +pravé +ji +nad +nejsou +či +pod +téma +mezi +přes +ty +pak +vám +ani +když +však +neg +jsem +tento +článku +články +aby +jsme +před +pta +jejich +byl +ještě +až +bez +také +pouze +první +vaše +která +nás +nový +tipy +pokud +může +strana +jeho +své +jiné +zprávy +nové +není +vás +jen +podle +zde +už +být +více +bude +již +než +který +by +které +co +nebo +ten +tak +má +při +od +po +jsou +jak +další +ale +si +se +ve +to +jako +za +zpět +ze +do +pro +je +na +atd +atp +jakmile +přičemž +já +on +ona +ono +oni +ony +my +vy +jí +ji +mě +mne +jemu +tomu +těm +těmu +němu +němuž +jehož +jíž +jelikož +jež +jakož +načež diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_da.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_da.txt new file mode 100644 index 0000000000..42e6145b98 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_da.txt @@ -0,0 +1,110 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/danish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Danish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + +og | and +i | in +jeg | I +det | that (dem. pronoun)/it (pers. pronoun) +at | that (in front of a sentence)/to (with infinitive) +en | a/an +den | it (pers. pronoun)/that (dem. pronoun) +til | to/at/for/until/against/by/of/into, more +er | present tense of "to be" +som | who, as +på | on/upon/in/on/at/to/after/of/with/for, on +de | they +med | with/by/in, along +han | he +af | of/by/from/off/for/in/with/on, off +for | at/for/to/from/by/of/ago, in front/before, because +ikke | not +der | who/which, there/those +var | past tense of "to be" +mig | me/myself +sig | oneself/himself/herself/itself/themselves +men | but +et | a/an/one, one (number), someone/somebody/one +har | present tense of "to have" +om | round/about/for/in/a, about/around/down, if +vi | we +min | my +havde | past tense of "to have" +ham | him +hun | she +nu | now +over | over/above/across/by/beyond/past/on/about, over/past +da | then, when/as/since +fra | from/off/since, off, since +du | you +ud | out +sin | his/her/its/one's +dem | them +os | us/ourselves +op | up +man | you/one +hans | his +hvor | where +eller | or +hvad | what +skal | must/shall etc. +selv | myself/youself/herself/ourselves etc., even +her | here +alle | all/everyone/everybody etc. +vil | will (verb) +blev | past tense of "to stay/to remain/to get/to become" +kunne | could +ind | in +når | when +være | present tense of "to be" +dog | however/yet/after all +noget | something +ville | would +jo | you know/you see (adv), yes +deres | their/theirs +efter | after/behind/according to/for/by/from, later/afterwards +ned | down +skulle | should +denne | this +end | than +dette | this +mit | my/mine +også | also +under | under/beneath/below/during, below/underneath +have | have +dig | you +anden | other +hende | her +mine | my +alt | everything +meget | much/very, plenty of +sit | his, her, its, one's +sine | his, her, its, one's +vor | our +mod | against +disse | these +hvis | if +din | your/yours +nogle | some +hos | by/at +blive | be/become +mange | many +ad | by/through +bliver | present tense of "to be/to become" +hendes | her/hers +været | be +thi | for (conj) +jer | you +sådan | such, like this/like that diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_de.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_de.txt new file mode 100644 index 0000000000..86525e7ae0 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_de.txt @@ -0,0 +1,294 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/german/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A German stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | The number of forms in this list is reduced significantly by passing it + | through the German stemmer. + + +aber | but + +alle | all +allem +allen +aller +alles + +als | than, as +also | so +am | an + dem +an | at + +ander | other +andere +anderem +anderen +anderer +anderes +anderm +andern +anderr +anders + +auch | also +auf | on +aus | out of +bei | by +bin | am +bis | until +bist | art +da | there +damit | with it +dann | then + +der | the +den +des +dem +die +das + +daß | that + +derselbe | the same +derselben +denselben +desselben +demselben +dieselbe +dieselben +dasselbe + +dazu | to that + +dein | thy +deine +deinem +deinen +deiner +deines + +denn | because + +derer | of those +dessen | of him + +dich | thee +dir | to thee +du | thou + +dies | this +diese +diesem +diesen +dieser +dieses + + +doch | (several meanings) +dort | (over) there + + +durch | through + +ein | a +eine +einem +einen +einer +eines + +einig | some +einige +einigem +einigen +einiger +einiges + +einmal | once + +er | he +ihn | him +ihm | to him + +es | it +etwas | something + +euer | your +eure +eurem +euren +eurer +eures + +für | for +gegen | towards +gewesen | p.p. of sein +hab | have +habe | have +haben | have +hat | has +hatte | had +hatten | had +hier | here +hin | there +hinter | behind + +ich | I +mich | me +mir | to me + + +ihr | you, to her +ihre +ihrem +ihren +ihrer +ihres +euch | to you + +im | in + dem +in | in +indem | while +ins | in + das +ist | is + +jede | each, every +jedem +jeden +jeder +jedes + +jene | that +jenem +jenen +jener +jenes + +jetzt | now +kann | can + +kein | no +keine +keinem +keinen +keiner +keines + +können | can +könnte | could +machen | do +man | one + +manche | some, many a +manchem +manchen +mancher +manches + +mein | my +meine +meinem +meinen +meiner +meines + +mit | with +muss | must +musste | had to +nach | to(wards) +nicht | not +nichts | nothing +noch | still, yet +nun | now +nur | only +ob | whether +oder | or +ohne | without +sehr | very + +sein | his +seine +seinem +seinen +seiner +seines + +selbst | self +sich | herself + +sie | they, she +ihnen | to them + +sind | are +so | so + +solche | such +solchem +solchen +solcher +solches + +soll | shall +sollte | should +sondern | but +sonst | else +über | over +um | about, around +und | and + +uns | us +unse +unsem +unsen +unser +unses + +unter | under +viel | much +vom | von + dem +von | from +vor | before +während | while +war | was +waren | were +warst | wast +was | what +weg | away, off +weil | because +weiter | further + +welche | which +welchem +welchen +welcher +welches + +wenn | when +werde | will +werden | will +wie | how +wieder | again +will | want +wir | we +wird | will +wirst | willst +wo | where +wollen | want +wollte | wanted +würde | would +würden | would +zu | to +zum | zu + dem +zur | zu + der +zwar | indeed +zwischen | between + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_el.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_el.txt new file mode 100644 index 0000000000..232681f5bd --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_el.txt @@ -0,0 +1,78 @@ +# Lucene Greek Stopwords list +# Note: by default this file is used after GreekLowerCaseFilter, +# so when modifying this file use 'σ' instead of 'ς' +ο +η +το +οι +τα +του +τησ +των +τον +την +και +κι +κ +ειμαι +εισαι +ειναι +ειμαστε +ειστε +στο +στον +στη +στην +μα +αλλα +απο +για +προσ +με +σε +ωσ +παρα +αντι +κατα +μετα +θα +να +δε +δεν +μη +μην +επι +ενω +εαν +αν +τοτε +που +πωσ +ποιοσ +ποια +ποιο +ποιοι +ποιεσ +ποιων +ποιουσ +αυτοσ +αυτη +αυτο +αυτοι +αυτων +αυτουσ +αυτεσ +αυτα +εκεινοσ +εκεινη +εκεινο +εκεινοι +εκεινεσ +εκεινα +εκεινων +εκεινουσ +οπωσ +ομωσ +ισωσ +οσο +οτι diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_en.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_en.txt new file mode 100644 index 0000000000..2c164c0b2a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_en.txt @@ -0,0 +1,54 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# a couple of test stopwords to test that the words are really being +# configured from this file: +stopworda +stopwordb + +# Standard english stop words taken from Lucene's StopAnalyzer +a +an +and +are +as +at +be +but +by +for +if +in +into +is +it +no +not +of +on +or +such +that +the +their +then +there +these +they +this +to +was +will +with diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_es.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_es.txt new file mode 100644 index 0000000000..487d78c8d5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_es.txt @@ -0,0 +1,356 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/spanish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Spanish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + + | The following is a ranked list (commonest to rarest) of stopwords + | deriving from a large sample of text. + + | Extra words have been added at the end. + +de | from, of +la | the, her +que | who, that +el | the +en | in +y | and +a | to +los | the, them +del | de + el +se | himself, from him etc +las | the, them +por | for, by, etc +un | a +para | for +con | with +no | no +una | a +su | his, her +al | a + el + | es from SER +lo | him +como | how +más | more +pero | pero +sus | su plural +le | to him, her +ya | already +o | or + | fue from SER +este | this + | ha from HABER +sí | himself etc +porque | because +esta | this + | son from SER +entre | between + | está from ESTAR +cuando | when +muy | very +sin | without +sobre | on + | ser from SER + | tiene from TENER +también | also +me | me +hasta | until +hay | there is/are +donde | where + | han from HABER +quien | whom, that + | están from ESTAR + | estado from ESTAR +desde | from +todo | all +nos | us +durante | during + | estados from ESTAR +todos | all +uno | a +les | to them +ni | nor +contra | against +otros | other + | fueron from SER +ese | that +eso | that + | había from HABER +ante | before +ellos | they +e | and (variant of y) +esto | this +mí | me +antes | before +algunos | some +qué | what? +unos | a +yo | I +otro | other +otras | other +otra | other +él | he +tanto | so much, many +esa | that +estos | these +mucho | much, many +quienes | who +nada | nothing +muchos | many +cual | who + | sea from SER +poco | few +ella | she +estar | to be + | haber from HABER +estas | these + | estaba from ESTAR + | estamos from ESTAR +algunas | some +algo | something +nosotros | we + + | other forms + +mi | me +mis | mi plural +tú | thou +te | thee +ti | thee +tu | thy +tus | tu plural +ellas | they +nosotras | we +vosotros | you +vosotras | you +os | you +mío | mine +mía | +míos | +mías | +tuyo | thine +tuya | +tuyos | +tuyas | +suyo | his, hers, theirs +suya | +suyos | +suyas | +nuestro | ours +nuestra | +nuestros | +nuestras | +vuestro | yours +vuestra | +vuestros | +vuestras | +esos | those +esas | those + + | forms of estar, to be (not including the infinitive): +estoy +estás +está +estamos +estáis +están +esté +estés +estemos +estéis +estén +estaré +estarás +estará +estaremos +estaréis +estarán +estaría +estarías +estaríamos +estaríais +estarían +estaba +estabas +estábamos +estabais +estaban +estuve +estuviste +estuvo +estuvimos +estuvisteis +estuvieron +estuviera +estuvieras +estuviéramos +estuvierais +estuvieran +estuviese +estuvieses +estuviésemos +estuvieseis +estuviesen +estando +estado +estada +estados +estadas +estad + + | forms of haber, to have (not including the infinitive): +he +has +ha +hemos +habéis +han +haya +hayas +hayamos +hayáis +hayan +habré +habrás +habrá +habremos +habréis +habrán +habría +habrías +habríamos +habríais +habrían +había +habías +habíamos +habíais +habían +hube +hubiste +hubo +hubimos +hubisteis +hubieron +hubiera +hubieras +hubiéramos +hubierais +hubieran +hubiese +hubieses +hubiésemos +hubieseis +hubiesen +habiendo +habido +habida +habidos +habidas + + | forms of ser, to be (not including the infinitive): +soy +eres +es +somos +sois +son +sea +seas +seamos +seáis +sean +seré +serás +será +seremos +seréis +serán +sería +serías +seríamos +seríais +serían +era +eras +éramos +erais +eran +fui +fuiste +fue +fuimos +fuisteis +fueron +fuera +fueras +fuéramos +fuerais +fueran +fuese +fueses +fuésemos +fueseis +fuesen +siendo +sido + | sed also means 'thirst' + + | forms of tener, to have (not including the infinitive): +tengo +tienes +tiene +tenemos +tenéis +tienen +tenga +tengas +tengamos +tengáis +tengan +tendré +tendrás +tendrá +tendremos +tendréis +tendrán +tendría +tendrías +tendríamos +tendríais +tendrían +tenía +tenías +teníamos +teníais +tenían +tuve +tuviste +tuvo +tuvimos +tuvisteis +tuvieron +tuviera +tuvieras +tuviéramos +tuvierais +tuvieran +tuviese +tuvieses +tuviésemos +tuvieseis +tuviesen +teniendo +tenido +tenida +tenidos +tenidas +tened + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_eu.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_eu.txt new file mode 100644 index 0000000000..25f1db9346 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_eu.txt @@ -0,0 +1,99 @@ +# example set of basque stopwords +al +anitz +arabera +asko +baina +bat +batean +batek +bati +batzuei +batzuek +batzuetan +batzuk +bera +beraiek +berau +berauek +bere +berori +beroriek +beste +bezala +da +dago +dira +ditu +du +dute +edo +egin +ere +eta +eurak +ez +gainera +gu +gutxi +guzti +haiei +haiek +haietan +hainbeste +hala +han +handik +hango +hara +hari +hark +hartan +hau +hauei +hauek +hauetan +hemen +hemendik +hemengo +hi +hona +honek +honela +honetan +honi +hor +hori +horiei +horiek +horietan +horko +horra +horrek +horrela +horretan +horri +hortik +hura +izan +ni +noiz +nola +non +nondik +nongo +nor +nora +ze +zein +zen +zenbait +zenbat +zer +zergatik +ziren +zituen +zu +zuek +zuen +zuten diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fa.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fa.txt new file mode 100644 index 0000000000..723641c6da --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fa.txt @@ -0,0 +1,313 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +# Note: by default this file is used after normalization, so when adding entries +# to this file, use the arabic 'ي' instead of 'ی' +انان +نداشته +سراسر +خياه +ايشان +وي +تاكنون +بيشتري +دوم +پس +ناشي +وگو +يا +داشتند +سپس +هنگام +هرگز +پنج +نشان +امسال +ديگر +گروهي +شدند +چطور +ده +و +دو +نخستين +ولي +چرا +چه +وسط +ه +كدام +قابل +يك +رفت +هفت +همچنين +در +هزار +بله +بلي +شايد +اما +شناسي +گرفته +دهد +داشته +دانست +داشتن +خواهيم +ميليارد +وقتيكه +امد +خواهد +جز +اورده +شده +بلكه +خدمات +شدن +برخي +نبود +بسياري +جلوگيري +حق +كردند +نوعي +بعري +نكرده +نظير +نبايد +بوده +بودن +داد +اورد +هست +جايي +شود +دنبال +داده +بايد +سابق +هيچ +همان +انجا +كمتر +كجاست +گردد +كسي +تر +مردم +تان +دادن +بودند +سري +جدا +ندارند +مگر +يكديگر +دارد +دهند +بنابراين +هنگامي +سمت +جا +انچه +خود +دادند +زياد +دارند +اثر +بدون +بهترين +بيشتر +البته +به +براساس +بيرون +كرد +بعضي +گرفت +توي +اي +ميليون +او +جريان +تول +بر +مانند +برابر +باشيم +مدتي +گويند +اكنون +تا +تنها +جديد +چند +بي +نشده +كردن +كردم +گويد +كرده +كنيم +نمي +نزد +روي +قصد +فقط +بالاي +ديگران +اين +ديروز +توسط +سوم +ايم +دانند +سوي +استفاده +شما +كنار +داريم +ساخته +طور +امده +رفته +نخست +بيست +نزديك +طي +كنيد +از +انها +تمامي +داشت +يكي +طريق +اش +چيست +روب +نمايد +گفت +چندين +چيزي +تواند +ام +ايا +با +ان +ايد +ترين +اينكه +ديگري +راه +هايي +بروز +همچنان +پاعين +كس +حدود +مختلف +مقابل +چيز +گيرد +ندارد +ضد +همچون +سازي +شان +مورد +باره +مرسي +خويش +برخوردار +چون +خارج +شش +هنوز +تحت +ضمن +هستيم +گفته +فكر +بسيار +پيش +براي +روزهاي +انكه +نخواهد +بالا +كل +وقتي +كي +چنين +كه +گيري +نيست +است +كجا +كند +نيز +يابد +بندي +حتي +توانند +عقب +خواست +كنند +بين +تمام +همه +ما +باشند +مثل +شد +اري +باشد +اره +طبق +بعد +اگر +صورت +غير +جاي +بيش +ريزي +اند +زيرا +چگونه +بار +لطفا +مي +درباره +من +ديده +همين +گذاري +برداري +علت +گذاشته +هم +فوق +نه +ها +شوند +اباد +همواره +هر +اول +خواهند +چهار +نام +امروز +مان +هاي +قبل +كنم +سعي +تازه +را +هستند +زير +جلوي +عنوان +بود diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fi.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fi.txt new file mode 100644 index 0000000000..4372c9a055 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fi.txt @@ -0,0 +1,97 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/finnish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + +| forms of BE + +olla +olen +olet +on +olemme +olette +ovat +ole | negative form + +oli +olisi +olisit +olisin +olisimme +olisitte +olisivat +olit +olin +olimme +olitte +olivat +ollut +olleet + +en | negation +et +ei +emme +ette +eivät + +|Nom Gen Acc Part Iness Elat Illat Adess Ablat Allat Ess Trans +minä minun minut minua minussa minusta minuun minulla minulta minulle | I +sinä sinun sinut sinua sinussa sinusta sinuun sinulla sinulta sinulle | you +hän hänen hänet häntä hänessä hänestä häneen hänellä häneltä hänelle | he she +me meidän meidät meitä meissä meistä meihin meillä meiltä meille | we +te teidän teidät teitä teissä teistä teihin teillä teiltä teille | you +he heidän heidät heitä heissä heistä heihin heillä heiltä heille | they + +tämä tämän tätä tässä tästä tähän tallä tältä tälle tänä täksi | this +tuo tuon tuotä tuossa tuosta tuohon tuolla tuolta tuolle tuona tuoksi | that +se sen sitä siinä siitä siihen sillä siltä sille sinä siksi | it +nämä näiden näitä näissä näistä näihin näillä näiltä näille näinä näiksi | these +nuo noiden noita noissa noista noihin noilla noilta noille noina noiksi | those +ne niiden niitä niissä niistä niihin niillä niiltä niille niinä niiksi | they + +kuka kenen kenet ketä kenessä kenestä keneen kenellä keneltä kenelle kenenä keneksi| who +ketkä keiden ketkä keitä keissä keistä keihin keillä keiltä keille keinä keiksi | (pl) +mikä minkä minkä mitä missä mistä mihin millä miltä mille minä miksi | which what +mitkä | (pl) + +joka jonka jota jossa josta johon jolla jolta jolle jona joksi | who which +jotka joiden joita joissa joista joihin joilla joilta joille joina joiksi | (pl) + +| conjunctions + +että | that +ja | and +jos | if +koska | because +kuin | than +mutta | but +niin | so +sekä | and +sillä | for +tai | or +vaan | but +vai | or +vaikka | although + + +| prepositions + +kanssa | with +mukaan | according to +noin | about +poikki | across +yli | over, across + +| other + +kun | when +niin | so +nyt | now +itse | self + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fr.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fr.txt new file mode 100644 index 0000000000..749abae684 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_fr.txt @@ -0,0 +1,186 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/french/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A French stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + +au | a + le +aux | a + les +avec | with +ce | this +ces | these +dans | with +de | of +des | de + les +du | de + le +elle | she +en | `of them' etc +et | and +eux | them +il | he +je | I +la | the +le | the +leur | their +lui | him +ma | my (fem) +mais | but +me | me +même | same; as in moi-même (myself) etc +mes | me (pl) +moi | me +mon | my (masc) +ne | not +nos | our (pl) +notre | our +nous | we +on | one +ou | where +par | by +pas | not +pour | for +qu | que before vowel +que | that +qui | who +sa | his, her (fem) +se | oneself +ses | his (pl) +son | his, her (masc) +sur | on +ta | thy (fem) +te | thee +tes | thy (pl) +toi | thee +ton | thy (masc) +tu | thou +un | a +une | a +vos | your (pl) +votre | your +vous | you + + | single letter forms + +c | c' +d | d' +j | j' +l | l' +à | to, at +m | m' +n | n' +s | s' +t | t' +y | there + + | forms of être (not including the infinitive): +été +étée +étées +étés +étant +suis +es +est +sommes +êtes +sont +serai +seras +sera +serons +serez +seront +serais +serait +serions +seriez +seraient +étais +était +étions +étiez +étaient +fus +fut +fûmes +fûtes +furent +sois +soit +soyons +soyez +soient +fusse +fusses +fût +fussions +fussiez +fussent + + | forms of avoir (not including the infinitive): +ayant +eu +eue +eues +eus +ai +as +avons +avez +ont +aurai +auras +aura +aurons +aurez +auront +aurais +aurait +aurions +auriez +auraient +avais +avait +avions +aviez +avaient +eut +eûmes +eûtes +eurent +aie +aies +ait +ayons +ayez +aient +eusse +eusses +eût +eussions +eussiez +eussent + + | Later additions (from Jean-Christophe Deschamps) +ceci | this +cela | that +celà | that +cet | this +cette | this +ici | here +ils | they +les | the (pl) +leurs | their (pl) +quel | which +quels | which +quelle | which +quelles | which +sans | without +soi | oneself + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ga.txt new file mode 100644 index 0000000000..9ff88d747e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ga.txt @@ -0,0 +1,110 @@ + +a +ach +ag +agus +an +aon +ar +arna +as +b' +ba +beirt +bhúr +caoga +ceathair +ceathrar +chomh +chtó +chuig +chun +cois +céad +cúig +cúigear +d' +daichead +dar +de +deich +deichniúr +den +dhá +do +don +dtí +dá +dár +dó +faoi +faoin +faoina +faoinár +fara +fiche +gach +gan +go +gur +haon +hocht +i +iad +idir +in +ina +ins +inár +is +le +leis +lena +lenár +m' +mar +mo +mé +na +nach +naoi +naonúr +ná +ní +níor +nó +nócha +ocht +ochtar +os +roimh +sa +seacht +seachtar +seachtó +seasca +seisear +siad +sibh +sinn +sna +sé +sí +tar +thar +thú +triúr +trí +trína +trínár +tríocha +tú +um +ár +é +éis +í +ó +ón +óna +ónár diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_gl.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_gl.txt new file mode 100644 index 0000000000..d8760b12c1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_gl.txt @@ -0,0 +1,161 @@ +# galican stopwords +a +aínda +alí +aquel +aquela +aquelas +aqueles +aquilo +aquí +ao +aos +as +así +á +ben +cando +che +co +coa +comigo +con +connosco +contigo +convosco +coas +cos +cun +cuns +cunha +cunhas +da +dalgunha +dalgunhas +dalgún +dalgúns +das +de +del +dela +delas +deles +desde +deste +do +dos +dun +duns +dunha +dunhas +e +el +ela +elas +eles +en +era +eran +esa +esas +ese +eses +esta +estar +estaba +está +están +este +estes +estiven +estou +eu +é +facer +foi +foron +fun +había +hai +iso +isto +la +las +lle +lles +lo +los +mais +me +meu +meus +min +miña +miñas +moi +na +nas +neste +nin +no +non +nos +nosa +nosas +noso +nosos +nós +nun +nunha +nuns +nunhas +o +os +ou +ó +ós +para +pero +pode +pois +pola +polas +polo +polos +por +que +se +senón +ser +seu +seus +sexa +sido +sobre +súa +súas +tamén +tan +te +ten +teñen +teño +ter +teu +teus +ti +tido +tiña +tiven +túa +túas +un +unha +unhas +uns +vos +vosa +vosas +voso +vosos +vós diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hi.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hi.txt new file mode 100644 index 0000000000..86286bb083 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hi.txt @@ -0,0 +1,235 @@ +# Also see http://www.opensource.org/licenses/bsd-license.html +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# This file was created by Jacques Savoy and is distributed under the BSD license. +# Note: by default this file also contains forms normalized by HindiNormalizer +# for spelling variation (see section below), such that it can be used whether or +# not you enable that feature. When adding additional entries to this list, +# please add the normalized form as well. +अंदर +अत +अपना +अपनी +अपने +अभी +आदि +आप +इत्यादि +इन +इनका +इन्हीं +इन्हें +इन्हों +इस +इसका +इसकी +इसके +इसमें +इसी +इसे +उन +उनका +उनकी +उनके +उनको +उन्हीं +उन्हें +उन्हों +उस +उसके +उसी +उसे +एक +एवं +एस +ऐसे +और +कई +कर +करता +करते +करना +करने +करें +कहते +कहा +का +काफ़ी +कि +कितना +किन्हें +किन्हों +किया +किर +किस +किसी +किसे +की +कुछ +कुल +के +को +कोई +कौन +कौनसा +गया +घर +जब +जहाँ +जा +जितना +जिन +जिन्हें +जिन्हों +जिस +जिसे +जीधर +जैसा +जैसे +जो +तक +तब +तरह +तिन +तिन्हें +तिन्हों +तिस +तिसे +तो +था +थी +थे +दबारा +दिया +दुसरा +दूसरे +दो +द्वारा +न +नहीं +ना +निहायत +नीचे +ने +पर +पर +पहले +पूरा +पे +फिर +बनी +बही +बहुत +बाद +बाला +बिलकुल +भी +भीतर +मगर +मानो +मे +में +यदि +यह +यहाँ +यही +या +यिह +ये +रखें +रहा +रहे +ऱ्वासा +लिए +लिये +लेकिन +व +वर्ग +वह +वह +वहाँ +वहीं +वाले +वुह +वे +वग़ैरह +संग +सकता +सकते +सबसे +सभी +साथ +साबुत +साभ +सारा +से +सो +ही +हुआ +हुई +हुए +है +हैं +हो +होता +होती +होते +होना +होने +# additional normalized forms of the above +अपनि +जेसे +होति +सभि +तिंहों +इंहों +दवारा +इसि +किंहें +थि +उंहों +ओर +जिंहें +वहिं +अभि +बनि +हि +उंहिं +उंहें +हें +वगेरह +एसे +रवासा +कोन +निचे +काफि +उसि +पुरा +भितर +हे +बहि +वहां +कोइ +यहां +जिंहों +तिंहें +किसि +कइ +यहि +इंहिं +जिधर +इंहें +अदि +इतयादि +हुइ +कोनसा +इसकि +दुसरे +जहां +अप +किंहों +उनकि +भि +वरग +हुअ +जेसा +नहिं diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hu.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hu.txt new file mode 100644 index 0000000000..37526da8aa --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hu.txt @@ -0,0 +1,211 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/hungarian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + +| Hungarian stop word list +| prepared by Anna Tordai + +a +ahogy +ahol +aki +akik +akkor +alatt +által +általában +amely +amelyek +amelyekben +amelyeket +amelyet +amelynek +ami +amit +amolyan +amíg +amikor +át +abban +ahhoz +annak +arra +arról +az +azok +azon +azt +azzal +azért +aztán +azután +azonban +bár +be +belül +benne +cikk +cikkek +cikkeket +csak +de +e +eddig +egész +egy +egyes +egyetlen +egyéb +egyik +egyre +ekkor +el +elég +ellen +elő +először +előtt +első +én +éppen +ebben +ehhez +emilyen +ennek +erre +ez +ezt +ezek +ezen +ezzel +ezért +és +fel +felé +hanem +hiszen +hogy +hogyan +igen +így +illetve +ill. +ill +ilyen +ilyenkor +ison +ismét +itt +jó +jól +jobban +kell +kellett +keresztül +keressünk +ki +kívül +között +közül +legalább +lehet +lehetett +legyen +lenne +lenni +lesz +lett +maga +magát +majd +majd +már +más +másik +meg +még +mellett +mert +mely +melyek +mi +mit +míg +miért +milyen +mikor +minden +mindent +mindenki +mindig +mint +mintha +mivel +most +nagy +nagyobb +nagyon +ne +néha +nekem +neki +nem +néhány +nélkül +nincs +olyan +ott +össze +ő +ők +őket +pedig +persze +rá +s +saját +sem +semmi +sok +sokat +sokkal +számára +szemben +szerint +szinte +talán +tehát +teljes +tovább +továbbá +több +úgy +ugyanis +új +újabb +újra +után +utána +utolsó +vagy +vagyis +valaki +valami +valamint +való +vagyok +van +vannak +volt +voltam +voltak +voltunk +vissza +vele +viszont +volna diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hy.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hy.txt new file mode 100644 index 0000000000..60c1c50fbc --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_hy.txt @@ -0,0 +1,46 @@ +# example set of Armenian stopwords. +այդ +այլ +այն +այս +դու +դուք +եմ +են +ենք +ես +եք +է +էի +էին +էինք +էիր +էիք +էր +ըստ +թ +ի +ին +իսկ +իր +կամ +համար +հետ +հետո +մենք +մեջ +մի +ն +նա +նաև +նրա +նրանք +որ +որը +որոնք +որպես +ու +ում +պիտի +վրա +և diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_id.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_id.txt new file mode 100644 index 0000000000..4617f83a5c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_id.txt @@ -0,0 +1,359 @@ +# from appendix D of: A Study of Stemming Effects on Information +# Retrieval in Bahasa Indonesia +ada +adanya +adalah +adapun +agak +agaknya +agar +akan +akankah +akhirnya +aku +akulah +amat +amatlah +anda +andalah +antar +diantaranya +antara +antaranya +diantara +apa +apaan +mengapa +apabila +apakah +apalagi +apatah +atau +ataukah +ataupun +bagai +bagaikan +sebagai +sebagainya +bagaimana +bagaimanapun +sebagaimana +bagaimanakah +bagi +bahkan +bahwa +bahwasanya +sebaliknya +banyak +sebanyak +beberapa +seberapa +begini +beginian +beginikah +beginilah +sebegini +begitu +begitukah +begitulah +begitupun +sebegitu +belum +belumlah +sebelum +sebelumnya +sebenarnya +berapa +berapakah +berapalah +berapapun +betulkah +sebetulnya +biasa +biasanya +bila +bilakah +bisa +bisakah +sebisanya +boleh +bolehkah +bolehlah +buat +bukan +bukankah +bukanlah +bukannya +cuma +percuma +dahulu +dalam +dan +dapat +dari +daripada +dekat +demi +demikian +demikianlah +sedemikian +dengan +depan +di +dia +dialah +dini +diri +dirinya +terdiri +dong +dulu +enggak +enggaknya +entah +entahlah +terhadap +terhadapnya +hal +hampir +hanya +hanyalah +harus +haruslah +harusnya +seharusnya +hendak +hendaklah +hendaknya +hingga +sehingga +ia +ialah +ibarat +ingin +inginkah +inginkan +ini +inikah +inilah +itu +itukah +itulah +jangan +jangankan +janganlah +jika +jikalau +juga +justru +kala +kalau +kalaulah +kalaupun +kalian +kami +kamilah +kamu +kamulah +kan +kapan +kapankah +kapanpun +dikarenakan +karena +karenanya +ke +kecil +kemudian +kenapa +kepada +kepadanya +ketika +seketika +khususnya +kini +kinilah +kiranya +sekiranya +kita +kitalah +kok +lagi +lagian +selagi +lah +lain +lainnya +melainkan +selaku +lalu +melalui +terlalu +lama +lamanya +selama +selama +selamanya +lebih +terlebih +bermacam +macam +semacam +maka +makanya +makin +malah +malahan +mampu +mampukah +mana +manakala +manalagi +masih +masihkah +semasih +masing +mau +maupun +semaunya +memang +mereka +merekalah +meski +meskipun +semula +mungkin +mungkinkah +nah +namun +nanti +nantinya +nyaris +oleh +olehnya +seorang +seseorang +pada +padanya +padahal +paling +sepanjang +pantas +sepantasnya +sepantasnyalah +para +pasti +pastilah +per +pernah +pula +pun +merupakan +rupanya +serupa +saat +saatnya +sesaat +saja +sajalah +saling +bersama +sama +sesama +sambil +sampai +sana +sangat +sangatlah +saya +sayalah +se +sebab +sebabnya +sebuah +tersebut +tersebutlah +sedang +sedangkan +sedikit +sedikitnya +segala +segalanya +segera +sesegera +sejak +sejenak +sekali +sekalian +sekalipun +sesekali +sekaligus +sekarang +sekarang +sekitar +sekitarnya +sela +selain +selalu +seluruh +seluruhnya +semakin +sementara +sempat +semua +semuanya +sendiri +sendirinya +seolah +seperti +sepertinya +sering +seringnya +serta +siapa +siapakah +siapapun +disini +disinilah +sini +sinilah +sesuatu +sesuatunya +suatu +sesudah +sesudahnya +sudah +sudahkah +sudahlah +supaya +tadi +tadinya +tak +tanpa +setelah +telah +tentang +tentu +tentulah +tentunya +tertentu +seterusnya +tapi +tetapi +setiap +tiap +setidaknya +tidak +tidakkah +tidaklah +toh +waduh +wah +wahai +sewaktu +walau +walaupun +wong +yaitu +yakni +yang diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_it.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_it.txt new file mode 100644 index 0000000000..1219cc773a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_it.txt @@ -0,0 +1,303 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/italian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | An Italian stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + +ad | a (to) before vowel +al | a + il +allo | a + lo +ai | a + i +agli | a + gli +all | a + l' +agl | a + gl' +alla | a + la +alle | a + le +con | with +col | con + il +coi | con + i (forms collo, cogli etc are now very rare) +da | from +dal | da + il +dallo | da + lo +dai | da + i +dagli | da + gli +dall | da + l' +dagl | da + gll' +dalla | da + la +dalle | da + le +di | of +del | di + il +dello | di + lo +dei | di + i +degli | di + gli +dell | di + l' +degl | di + gl' +della | di + la +delle | di + le +in | in +nel | in + el +nello | in + lo +nei | in + i +negli | in + gli +nell | in + l' +negl | in + gl' +nella | in + la +nelle | in + le +su | on +sul | su + il +sullo | su + lo +sui | su + i +sugli | su + gli +sull | su + l' +sugl | su + gl' +sulla | su + la +sulle | su + le +per | through, by +tra | among +contro | against +io | I +tu | thou +lui | he +lei | she +noi | we +voi | you +loro | they +mio | my +mia | +miei | +mie | +tuo | +tua | +tuoi | thy +tue | +suo | +sua | +suoi | his, her +sue | +nostro | our +nostra | +nostri | +nostre | +vostro | your +vostra | +vostri | +vostre | +mi | me +ti | thee +ci | us, there +vi | you, there +lo | him, the +la | her, the +li | them +le | them, the +gli | to him, the +ne | from there etc +il | the +un | a +uno | a +una | a +ma | but +ed | and +se | if +perché | why, because +anche | also +come | how +dov | where (as dov') +dove | where +che | who, that +chi | who +cui | whom +non | not +più | more +quale | who, that +quanto | how much +quanti | +quanta | +quante | +quello | that +quelli | +quella | +quelle | +questo | this +questi | +questa | +queste | +si | yes +tutto | all +tutti | all + + | single letter forms: + +a | at +c | as c' for ce or ci +e | and +i | the +l | as l' +o | or + + | forms of avere, to have (not including the infinitive): + +ho +hai +ha +abbiamo +avete +hanno +abbia +abbiate +abbiano +avrò +avrai +avrà +avremo +avrete +avranno +avrei +avresti +avrebbe +avremmo +avreste +avrebbero +avevo +avevi +aveva +avevamo +avevate +avevano +ebbi +avesti +ebbe +avemmo +aveste +ebbero +avessi +avesse +avessimo +avessero +avendo +avuto +avuta +avuti +avute + + | forms of essere, to be (not including the infinitive): +sono +sei +è +siamo +siete +sia +siate +siano +sarò +sarai +sarà +saremo +sarete +saranno +sarei +saresti +sarebbe +saremmo +sareste +sarebbero +ero +eri +era +eravamo +eravate +erano +fui +fosti +fu +fummo +foste +furono +fossi +fosse +fossimo +fossero +essendo + + | forms of fare, to do (not including the infinitive, fa, fat-): +faccio +fai +facciamo +fanno +faccia +facciate +facciano +farò +farai +farà +faremo +farete +faranno +farei +faresti +farebbe +faremmo +fareste +farebbero +facevo +facevi +faceva +facevamo +facevate +facevano +feci +facesti +fece +facemmo +faceste +fecero +facessi +facesse +facessimo +facessero +facendo + + | forms of stare, to be (not including the infinitive): +sto +stai +sta +stiamo +stanno +stia +stiate +stiano +starò +starai +starà +staremo +starete +staranno +starei +staresti +starebbe +staremmo +stareste +starebbero +stavo +stavi +stava +stavamo +stavate +stavano +stetti +stesti +stette +stemmo +steste +stettero +stessi +stesse +stessimo +stessero +stando diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ja.txt new file mode 100644 index 0000000000..d4321be6b1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ja.txt @@ -0,0 +1,127 @@ +# +# This file defines a stopword set for Japanese. +# +# This set is made up of hand-picked frequent terms from segmented Japanese Wikipedia. +# Punctuation characters and frequent kanji have mostly been left out. See LUCENE-3745 +# for frequency lists, etc. that can be useful for making your own set (if desired) +# +# Note that there is an overlap between these stopwords and the terms stopped when used +# in combination with the JapanesePartOfSpeechStopFilter. When editing this file, note +# that comments are not allowed on the same line as stopwords. +# +# Also note that stopping is done in a case-insensitive manner. Change your StopFilter +# configuration if you need case-sensitive stopping. Lastly, note that stopping is done +# using the same character width as the entries in this file. Since this StopFilter is +# normally done after a CJKWidthFilter in your chain, you would usually want your romaji +# entries to be in half-width and your kana entries to be in full-width. +# +の +に +は +を +た +が +で +て +と +し +れ +さ +ある +いる +も +する +から +な +こと +として +い +や +れる +など +なっ +ない +この +ため +その +あっ +よう +また +もの +という +あり +まで +られ +なる +へ +か +だ +これ +によって +により +おり +より +による +ず +なり +られる +において +ば +なかっ +なく +しかし +について +せ +だっ +その後 +できる +それ +う +ので +なお +のみ +でき +き +つ +における +および +いう +さらに +でも +ら +たり +その他 +に関する +たち +ます +ん +なら +に対して +特に +せる +及び +これら +とき +では +にて +ほか +ながら +うち +そして +とともに +ただし +かつて +それぞれ +または +お +ほど +ものの +に対する +ほとんど +と共に +といった +です +とも +ところ +ここ +##### End of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_lv.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_lv.txt new file mode 100644 index 0000000000..e21a23c06c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_lv.txt @@ -0,0 +1,172 @@ +# Set of Latvian stopwords from A Stemming Algorithm for Latvian, Karlis Kreslins +# the original list of over 800 forms was refined: +# pronouns, adverbs, interjections were removed +# +# prepositions +aiz +ap +ar +apakš +ārpus +augšpus +bez +caur +dēļ +gar +iekš +iz +kopš +labad +lejpus +līdz +no +otrpus +pa +par +pār +pēc +pie +pirms +pret +priekš +starp +šaipus +uz +viņpus +virs +virspus +zem +apakšpus +# Conjunctions +un +bet +jo +ja +ka +lai +tomēr +tikko +turpretī +arī +kaut +gan +tādēļ +tā +ne +tikvien +vien +kā +ir +te +vai +kamēr +# Particles +ar +diezin +droši +diemžēl +nebūt +ik +it +taču +nu +pat +tiklab +iekšpus +nedz +tik +nevis +turpretim +jeb +iekam +iekām +iekāms +kolīdz +līdzko +tiklīdz +jebšu +tālab +tāpēc +nekā +itin +jā +jau +jel +nē +nezin +tad +tikai +vis +tak +iekams +vien +# modal verbs +būt +biju +biji +bija +bijām +bijāt +esmu +esi +esam +esat +būšu +būsi +būs +būsim +būsiet +tikt +tiku +tiki +tika +tikām +tikāt +tieku +tiec +tiek +tiekam +tiekat +tikšu +tiks +tiksim +tiksiet +tapt +tapi +tapāt +topat +tapšu +tapsi +taps +tapsim +tapsiet +kļūt +kļuvu +kļuvi +kļuva +kļuvām +kļuvāt +kļūstu +kļūsti +kļūst +kļūstam +kļūstat +kļūšu +kļūsi +kļūs +kļūsim +kļūsiet +# verbs +varēt +varēju +varējām +varēšu +varēsim +var +varēji +varējāt +varēsi +varēsiet +varat +varēja +varēs diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_nl.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_nl.txt new file mode 100644 index 0000000000..47a2aeacf6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_nl.txt @@ -0,0 +1,119 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/dutch/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Dutch stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large sample of Dutch text. + + | Dutch stop words frequently exhibit homonym clashes. These are indicated + | clearly below. + +de | the +en | and +van | of, from +ik | I, the ego +te | (1) chez, at etc, (2) to, (3) too +dat | that, which +die | that, those, who, which +in | in, inside +een | a, an, one +hij | he +het | the, it +niet | not, nothing, naught +zijn | (1) to be, being, (2) his, one's, its +is | is +was | (1) was, past tense of all persons sing. of 'zijn' (to be) (2) wax, (3) the washing, (4) rise of river +op | on, upon, at, in, up, used up +aan | on, upon, to (as dative) +met | with, by +als | like, such as, when +voor | (1) before, in front of, (2) furrow +had | had, past tense all persons sing. of 'hebben' (have) +er | there +maar | but, only +om | round, about, for etc +hem | him +dan | then +zou | should/would, past tense all persons sing. of 'zullen' +of | or, whether, if +wat | what, something, anything +mijn | possessive and noun 'mine' +men | people, 'one' +dit | this +zo | so, thus, in this way +door | through by +over | over, across +ze | she, her, they, them +zich | oneself +bij | (1) a bee, (2) by, near, at +ook | also, too +tot | till, until +je | you +mij | me +uit | out of, from +der | Old Dutch form of 'van der' still found in surnames +daar | (1) there, (2) because +haar | (1) her, their, them, (2) hair +naar | (1) unpleasant, unwell etc, (2) towards, (3) as +heb | present first person sing. of 'to have' +hoe | how, why +heeft | present third person sing. of 'to have' +hebben | 'to have' and various parts thereof +deze | this +u | you +want | (1) for, (2) mitten, (3) rigging +nog | yet, still +zal | 'shall', first and third person sing. of verb 'zullen' (will) +me | me +zij | she, they +nu | now +ge | 'thou', still used in Belgium and south Netherlands +geen | none +omdat | because +iets | something, somewhat +worden | to become, grow, get +toch | yet, still +al | all, every, each +waren | (1) 'were' (2) to wander, (3) wares, (3) +veel | much, many +meer | (1) more, (2) lake +doen | to do, to make +toen | then, when +moet | noun 'spot/mote' and present form of 'to must' +ben | (1) am, (2) 'are' in interrogative second person singular of 'to be' +zonder | without +kan | noun 'can' and present form of 'to be able' +hun | their, them +dus | so, consequently +alles | all, everything, anything +onder | under, beneath +ja | yes, of course +eens | once, one day +hier | here +wie | who +werd | imperfect third person sing. of 'become' +altijd | always +doch | yet, but etc +wordt | present third person sing. of 'become' +wezen | (1) to be, (2) 'been' as in 'been fishing', (3) orphans +kunnen | to be able +ons | us/our +zelf | self +tegen | against, towards, at +na | after, near +reeds | already +wil | (1) present tense of 'want', (2) 'will', noun, (3) fender +kon | could; past tense of 'to be able' +niets | nothing +uw | your +iemand | somebody +geweest | been; past participle of 'be' +andere | other diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_no.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_no.txt new file mode 100644 index 0000000000..a7a2c28ba5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_no.txt @@ -0,0 +1,194 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/norwegian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Norwegian stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This stop word list is for the dominant bokmål dialect. Words unique + | to nynorsk are marked *. + + | Revised by Jan Bruusgaard , Jan 2005 + +og | and +i | in +jeg | I +det | it/this/that +at | to (w. inf.) +en | a/an +et | a/an +den | it/this/that +til | to +er | is/am/are +som | who/that +på | on +de | they / you(formal) +med | with +han | he +av | of +ikke | not +ikkje | not * +der | there +så | so +var | was/were +meg | me +seg | you +men | but +ett | one +har | have +om | about +vi | we +min | my +mitt | my +ha | have +hadde | had +hun | she +nå | now +over | over +da | when/as +ved | by/know +fra | from +du | you +ut | out +sin | your +dem | them +oss | us +opp | up +man | you/one +kan | can +hans | his +hvor | where +eller | or +hva | what +skal | shall/must +selv | self (reflective) +sjøl | self (reflective) +her | here +alle | all +vil | will +bli | become +ble | became +blei | became * +blitt | have become +kunne | could +inn | in +når | when +være | be +kom | come +noen | some +noe | some +ville | would +dere | you +som | who/which/that +deres | their/theirs +kun | only/just +ja | yes +etter | after +ned | down +skulle | should +denne | this +for | for/because +deg | you +si | hers/his +sine | hers/his +sitt | hers/his +mot | against +å | to +meget | much +hvorfor | why +dette | this +disse | these/those +uten | without +hvordan | how +ingen | none +din | your +ditt | your +blir | become +samme | same +hvilken | which +hvilke | which (plural) +sånn | such a +inni | inside/within +mellom | between +vår | our +hver | each +hvem | who +vors | us/ours +hvis | whose +både | both +bare | only/just +enn | than +fordi | as/because +før | before +mange | many +også | also +slik | just +vært | been +være | to be +båe | both * +begge | both +siden | since +dykk | your * +dykkar | yours * +dei | they * +deira | them * +deires | theirs * +deim | them * +di | your (fem.) * +då | as/when * +eg | I * +ein | a/an * +eit | a/an * +eitt | a/an * +elles | or * +honom | he * +hjå | at * +ho | she * +hoe | she * +henne | her +hennar | her/hers +hennes | hers +hoss | how * +hossen | how * +ikkje | not * +ingi | noone * +inkje | noone * +korleis | how * +korso | how * +kva | what/which * +kvar | where * +kvarhelst | where * +kven | who/whom * +kvi | why * +kvifor | why * +me | we * +medan | while * +mi | my * +mine | my * +mykje | much * +no | now * +nokon | some (masc./neut.) * +noka | some (fem.) * +nokor | some * +noko | some * +nokre | some * +si | his/hers * +sia | since * +sidan | since * +so | so * +somt | some * +somme | some * +um | about* +upp | up * +vere | be * +vore | was * +verte | become * +vort | become * +varte | became * +vart | became * + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_pt.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_pt.txt new file mode 100644 index 0000000000..acfeb01af6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_pt.txt @@ -0,0 +1,253 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/portuguese/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Portuguese stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + + | The following is a ranked list (commonest to rarest) of stopwords + | deriving from a large sample of text. + + | Extra words have been added at the end. + +de | of, from +a | the; to, at; her +o | the; him +que | who, that +e | and +do | de + o +da | de + a +em | in +um | a +para | for + | é from SER +com | with +não | not, no +uma | a +os | the; them +no | em + o +se | himself etc +na | em + a +por | for +mais | more +as | the; them +dos | de + os +como | as, like +mas | but + | foi from SER +ao | a + o +ele | he +das | de + as + | tem from TER +à | a + a +seu | his +sua | her +ou | or + | ser from SER +quando | when +muito | much + | há from HAV +nos | em + os; us +já | already, now + | está from EST +eu | I +também | also +só | only, just +pelo | per + o +pela | per + a +até | up to +isso | that +ela | he +entre | between + | era from SER +depois | after +sem | without +mesmo | same +aos | a + os + | ter from TER +seus | his +quem | whom +nas | em + as +me | me +esse | that +eles | they + | estão from EST +você | you + | tinha from TER + | foram from SER +essa | that +num | em + um +nem | nor +suas | her +meu | my +às | a + as +minha | my + | têm from TER +numa | em + uma +pelos | per + os +elas | they + | havia from HAV + | seja from SER +qual | which + | será from SER +nós | we + | tenho from TER +lhe | to him, her +deles | of them +essas | those +esses | those +pelas | per + as +este | this + | fosse from SER +dele | of him + + | other words. There are many contractions such as naquele = em+aquele, + | mo = me+o, but they are rare. + | Indefinite article plural forms are also rare. + +tu | thou +te | thee +vocês | you (plural) +vos | you +lhes | to them +meus | my +minhas +teu | thy +tua +teus +tuas +nosso | our +nossa +nossos +nossas + +dela | of her +delas | of them + +esta | this +estes | these +estas | these +aquele | that +aquela | that +aqueles | those +aquelas | those +isto | this +aquilo | that + + | forms of estar, to be (not including the infinitive): +estou +está +estamos +estão +estive +esteve +estivemos +estiveram +estava +estávamos +estavam +estivera +estivéramos +esteja +estejamos +estejam +estivesse +estivéssemos +estivessem +estiver +estivermos +estiverem + + | forms of haver, to have (not including the infinitive): +hei +há +havemos +hão +houve +houvemos +houveram +houvera +houvéramos +haja +hajamos +hajam +houvesse +houvéssemos +houvessem +houver +houvermos +houverem +houverei +houverá +houveremos +houverão +houveria +houveríamos +houveriam + + | forms of ser, to be (not including the infinitive): +sou +somos +são +era +éramos +eram +fui +foi +fomos +foram +fora +fôramos +seja +sejamos +sejam +fosse +fôssemos +fossem +for +formos +forem +serei +será +seremos +serão +seria +seríamos +seriam + + | forms of ter, to have (not including the infinitive): +tenho +tem +temos +tém +tinha +tínhamos +tinham +tive +teve +tivemos +tiveram +tivera +tivéramos +tenha +tenhamos +tenham +tivesse +tivéssemos +tivessem +tiver +tivermos +tiverem +terei +terá +teremos +terão +teria +teríamos +teriam diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ro.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ro.txt new file mode 100644 index 0000000000..4fdee90a5b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ro.txt @@ -0,0 +1,233 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +acea +aceasta +această +aceea +acei +aceia +acel +acela +acele +acelea +acest +acesta +aceste +acestea +aceşti +aceştia +acolo +acum +ai +aia +aibă +aici +al +ăla +ale +alea +ălea +altceva +altcineva +am +ar +are +aş +aşadar +asemenea +asta +ăsta +astăzi +astea +ăstea +ăştia +asupra +aţi +au +avea +avem +aveţi +azi +bine +bucur +bună +ca +că +căci +când +care +cărei +căror +cărui +cât +câte +câţi +către +câtva +ce +cel +ceva +chiar +cînd +cine +cineva +cît +cîte +cîţi +cîtva +contra +cu +cum +cumva +curând +curînd +da +dă +dacă +dar +datorită +de +deci +deja +deoarece +departe +deşi +din +dinaintea +dintr +dintre +drept +după +ea +ei +el +ele +eram +este +eşti +eu +face +fără +fi +fie +fiecare +fii +fim +fiţi +iar +ieri +îi +îl +îmi +împotriva +în +înainte +înaintea +încât +încît +încotro +între +întrucât +întrucît +îţi +la +lângă +le +li +lîngă +lor +lui +mă +mâine +mea +mei +mele +mereu +meu +mi +mine +mult +multă +mulţi +ne +nicăieri +nici +nimeni +nişte +noastră +noastre +noi +noştri +nostru +nu +ori +oricând +oricare +oricât +orice +oricînd +oricine +oricît +oricum +oriunde +până +pe +pentru +peste +pînă +poate +pot +prea +prima +primul +prin +printr +sa +să +săi +sale +sau +său +se +şi +sînt +sîntem +sînteţi +spre +sub +sunt +suntem +sunteţi +ta +tăi +tale +tău +te +ţi +ţie +tine +toată +toate +tot +toţi +totuşi +tu +un +una +unde +undeva +unei +unele +uneori +unor +vă +vi +voastră +voastre +voi +voştri +vostru +vouă +vreo +vreun diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ru.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ru.txt new file mode 100644 index 0000000000..55271400c6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_ru.txt @@ -0,0 +1,243 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/russian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | a russian stop word list. comments begin with vertical bar. each stop + | word is at the start of a line. + + | this is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + | letter `ё' is translated to `е'. + +и | and +в | in/into +во | alternative form +не | not +что | what/that +он | he +на | on/onto +я | i +с | from +со | alternative form +как | how +а | milder form of `no' (but) +то | conjunction and form of `that' +все | all +она | she +так | so, thus +его | him +но | but +да | yes/and +ты | thou +к | towards, by +у | around, chez +же | intensifier particle +вы | you +за | beyond, behind +бы | conditional/subj. particle +по | up to, along +только | only +ее | her +мне | to me +было | it was +вот | here is/are, particle +от | away from +меня | me +еще | still, yet, more +нет | no, there isnt/arent +о | about +из | out of +ему | to him +теперь | now +когда | when +даже | even +ну | so, well +вдруг | suddenly +ли | interrogative particle +если | if +уже | already, but homonym of `narrower' +или | or +ни | neither +быть | to be +был | he was +него | prepositional form of его +до | up to +вас | you accusative +нибудь | indef. suffix preceded by hyphen +опять | again +уж | already, but homonym of `adder' +вам | to you +сказал | he said +ведь | particle `after all' +там | there +потом | then +себя | oneself +ничего | nothing +ей | to her +может | usually with `быть' as `maybe' +они | they +тут | here +где | where +есть | there is/are +надо | got to, must +ней | prepositional form of ей +для | for +мы | we +тебя | thee +их | them, their +чем | than +была | she was +сам | self +чтоб | in order to +без | without +будто | as if +человек | man, person, one +чего | genitive form of `what' +раз | once +тоже | also +себе | to oneself +под | beneath +жизнь | life +будет | will be +ж | short form of intensifer particle `же' +тогда | then +кто | who +этот | this +говорил | was saying +того | genitive form of `that' +потому | for that reason +этого | genitive form of `this' +какой | which +совсем | altogether +ним | prepositional form of `его', `они' +здесь | here +этом | prepositional form of `этот' +один | one +почти | almost +мой | my +тем | instrumental/dative plural of `тот', `то' +чтобы | full form of `in order that' +нее | her (acc.) +кажется | it seems +сейчас | now +были | they were +куда | where to +зачем | why +сказать | to say +всех | all (acc., gen. preposn. plural) +никогда | never +сегодня | today +можно | possible, one can +при | by +наконец | finally +два | two +об | alternative form of `о', about +другой | another +хоть | even +после | after +над | above +больше | more +тот | that one (masc.) +через | across, in +эти | these +нас | us +про | about +всего | in all, only, of all +них | prepositional form of `они' (they) +какая | which, feminine +много | lots +разве | interrogative particle +сказала | she said +три | three +эту | this, acc. fem. sing. +моя | my, feminine +впрочем | moreover, besides +хорошо | good +свою | ones own, acc. fem. sing. +этой | oblique form of `эта', fem. `this' +перед | in front of +иногда | sometimes +лучше | better +чуть | a little +том | preposn. form of `that one' +нельзя | one must not +такой | such a one +им | to them +более | more +всегда | always +конечно | of course +всю | acc. fem. sing of `all' +между | between + + + | b: some paradigms + | + | personal pronouns + | + | я меня мне мной [мною] + | ты тебя тебе тобой [тобою] + | он его ему им [него, нему, ним] + | она ее эи ею [нее, нэи, нею] + | оно его ему им [него, нему, ним] + | + | мы нас нам нами + | вы вас вам вами + | они их им ими [них, ним, ними] + | + | себя себе собой [собою] + | + | demonstrative pronouns: этот (this), тот (that) + | + | этот эта это эти + | этого эты это эти + | этого этой этого этих + | этому этой этому этим + | этим этой этим [этою] этими + | этом этой этом этих + | + | тот та то те + | того ту то те + | того той того тех + | тому той тому тем + | тем той тем [тою] теми + | том той том тех + | + | determinative pronouns + | + | (a) весь (all) + | + | весь вся все все + | всего всю все все + | всего всей всего всех + | всему всей всему всем + | всем всей всем [всею] всеми + | всем всей всем всех + | + | (b) сам (himself etc) + | + | сам сама само сами + | самого саму само самих + | самого самой самого самих + | самому самой самому самим + | самим самой самим [самою] самими + | самом самой самом самих + | + | stems of verbs `to be', `to have', `to do' and modal + | + | быть бы буд быв есть суть + | име + | дел + | мог мож мочь + | уме + | хоч хот + | долж + | можн + | нужн + | нельзя + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_sv.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_sv.txt new file mode 100644 index 0000000000..096f87f676 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_sv.txt @@ -0,0 +1,133 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/swedish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Swedish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + | Swedish stop words occasionally exhibit homonym clashes. For example + | så = so, but also seed. These are indicated clearly below. + +och | and +det | it, this/that +att | to (with infinitive) +i | in, at +en | a +jag | I +hon | she +som | who, that +han | he +på | on +den | it, this/that +med | with +var | where, each +sig | him(self) etc +för | for +så | so (also: seed) +till | to +är | is +men | but +ett | a +om | if; around, about +hade | had +de | they, these/those +av | of +icke | not, no +mig | me +du | you +henne | her +då | then, when +sin | his +nu | now +har | have +inte | inte någon = no one +hans | his +honom | him +skulle | 'sake' +hennes | her +där | there +min | my +man | one (pronoun) +ej | nor +vid | at, by, on (also: vast) +kunde | could +något | some etc +från | from, off +ut | out +när | when +efter | after, behind +upp | up +vi | we +dem | them +vara | be +vad | what +över | over +än | than +dig | you +kan | can +sina | his +här | here +ha | have +mot | towards +alla | all +under | under (also: wonder) +någon | some etc +eller | or (else) +allt | all +mycket | much +sedan | since +ju | why +denna | this/that +själv | myself, yourself etc +detta | this/that +åt | to +utan | without +varit | was +hur | how +ingen | no +mitt | my +ni | you +bli | to be, become +blev | from bli +oss | us +din | thy +dessa | these/those +några | some etc +deras | their +blir | from bli +mina | my +samma | (the) same +vilken | who, that +er | you, your +sådan | such a +vår | our +blivit | from bli +dess | its +inom | within +mellan | between +sådant | such a +varför | why +varje | each +vilka | who, that +ditt | thy +vem | who +vilket | who, that +sitta | his +sådana | such a +vart | each +dina | thy +vars | whose +vårt | our +våra | our +ert | your +era | your +vilkas | whose + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_th.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_th.txt new file mode 100644 index 0000000000..07f0fabe69 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_th.txt @@ -0,0 +1,119 @@ +# Thai stopwords from: +# "Opinion Detection in Thai Political News Columns +# Based on Subjectivity Analysis" +# Khampol Sukhum, Supot Nitsuwat, and Choochart Haruechaiyasak +ไว้ +ไม่ +ไป +ได้ +ให้ +ใน +โดย +แห่ง +แล้ว +และ +แรก +แบบ +แต่ +เอง +เห็น +เลย +เริ่ม +เรา +เมื่อ +เพื่อ +เพราะ +เป็นการ +เป็น +เปิดเผย +เปิด +เนื่องจาก +เดียวกัน +เดียว +เช่น +เฉพาะ +เคย +เข้า +เขา +อีก +อาจ +อะไร +ออก +อย่าง +อยู่ +อยาก +หาก +หลาย +หลังจาก +หลัง +หรือ +หนึ่ง +ส่วน +ส่ง +สุด +สําหรับ +ว่า +วัน +ลง +ร่วม +ราย +รับ +ระหว่าง +รวม +ยัง +มี +มาก +มา +พร้อม +พบ +ผ่าน +ผล +บาง +น่า +นี้ +นํา +นั้น +นัก +นอกจาก +ทุก +ที่สุด +ที่ +ทําให้ +ทํา +ทาง +ทั้งนี้ +ทั้ง +ถ้า +ถูก +ถึง +ต้อง +ต่างๆ +ต่าง +ต่อ +ตาม +ตั้งแต่ +ตั้ง +ด้าน +ด้วย +ดัง +ซึ่ง +ช่วง +จึง +จาก +จัด +จะ +คือ +ความ +ครั้ง +คง +ขึ้น +ของ +ขอ +ขณะ +ก่อน +ก็ +การ +กับ +กัน +กว่า +กล่าว diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_tr.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_tr.txt new file mode 100644 index 0000000000..84d9408d4e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/stopwords_tr.txt @@ -0,0 +1,212 @@ +# Turkish stopwords from LUCENE-559 +# merged with the list from "Information Retrieval on Turkish Texts" +# (http://www.users.muohio.edu/canf/papers/JASIST2008offPrint.pdf) +acaba +altmış +altı +ama +ancak +arada +aslında +ayrıca +bana +bazı +belki +ben +benden +beni +benim +beri +beş +bile +bin +bir +birçok +biri +birkaç +birkez +birşey +birşeyi +biz +bize +bizden +bizi +bizim +böyle +böylece +bu +buna +bunda +bundan +bunlar +bunları +bunların +bunu +bunun +burada +çok +çünkü +da +daha +dahi +de +defa +değil +diğer +diye +doksan +dokuz +dolayı +dolayısıyla +dört +edecek +eden +ederek +edilecek +ediliyor +edilmesi +ediyor +eğer +elli +en +etmesi +etti +ettiği +ettiğini +gibi +göre +halen +hangi +hatta +hem +henüz +hep +hepsi +her +herhangi +herkesin +hiç +hiçbir +için +iki +ile +ilgili +ise +işte +itibaren +itibariyle +kadar +karşın +katrilyon +kendi +kendilerine +kendini +kendisi +kendisine +kendisini +kez +ki +kim +kimden +kime +kimi +kimse +kırk +milyar +milyon +mu +mü +mı +nasıl +ne +neden +nedenle +nerde +nerede +nereye +niye +niçin +o +olan +olarak +oldu +olduğu +olduğunu +olduklarını +olmadı +olmadığı +olmak +olması +olmayan +olmaz +olsa +olsun +olup +olur +olursa +oluyor +on +ona +ondan +onlar +onlardan +onları +onların +onu +onun +otuz +oysa +öyle +pek +rağmen +sadece +sanki +sekiz +seksen +sen +senden +seni +senin +siz +sizden +sizi +sizin +şey +şeyden +şeyi +şeyler +şöyle +şu +şuna +şunda +şundan +şunları +şunu +tarafından +trilyon +tüm +üç +üzere +var +vardı +ve +veya +ya +yani +yapacak +yapılan +yapılması +yapıyor +yapmak +yaptı +yaptığı +yaptığını +yaptıkları +yedi +yerine +yetmiş +yine +yirmi +yoksa +yüz +zaten diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/userdict_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/userdict_ja.txt new file mode 100644 index 0000000000..6f0368e4d8 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/lang/userdict_ja.txt @@ -0,0 +1,29 @@ +# +# This is a sample user dictionary for Kuromoji (JapaneseTokenizer) +# +# Add entries to this file in order to override the statistical model in terms +# of segmentation, readings and part-of-speech tags. Notice that entries do +# not have weights since they are always used when found. This is by-design +# in order to maximize ease-of-use. +# +# Entries are defined using the following CSV format: +# , ... , ... , +# +# Notice that a single half-width space separates tokens and readings, and +# that the number tokens and readings must match exactly. +# +# Also notice that multiple entries with the same is undefined. +# +# Whitespace only lines are ignored. Comments are not allowed on entry lines. +# + +# Custom segmentation for kanji compounds +日本経済新聞,日本 経済 新聞,ニホン ケイザイ シンブン,カスタム名詞 +関西国際空港,関西 国際 空港,カンサイ コクサイ クウコウ,カスタム名詞 + +# Custom segmentation for compound katakana +トートバッグ,トート バッグ,トート バッグ,かずカナ名詞 +ショルダーバッグ,ショルダー バッグ,ショルダー バッグ,かずカナ名詞 + +# Custom reading for former sumo wrestler +朝青龍,朝青龍,アサショウリュウ,カスタム人名 diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/managed-schema b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/managed-schema new file mode 100644 index 0000000000..5b969dd704 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/managed-schema @@ -0,0 +1,1005 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/params.json b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/params.json new file mode 100644 index 0000000000..06114ef257 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/params.json @@ -0,0 +1,20 @@ +{"params":{ + "query":{ + "defType":"edismax", + "q.alt":"*:*", + "rows":"10", + "fl":"*,score", + "":{"v":0} + }, + "facets":{ + "facet":"on", + "facet.mincount": "1", + "":{"v":0} + }, + "velocity":{ + "wt": "velocity", + "v.template":"browse", + "v.layout": "layout", + "":{"v":0} + } +}} \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/protwords.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/protwords.txt new file mode 100644 index 0000000000..1dfc0abecb --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/protwords.txt @@ -0,0 +1,21 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +# Use a protected word file to protect against the stemmer reducing two +# unrelated words to the same base word. + +# Some non-words that normally won't be encountered, +# just to test that they won't be stemmed. +dontstems +zwhacky + diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml new file mode 100644 index 0000000000..cd83ea35d4 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml @@ -0,0 +1,1482 @@ + + + + + + + + + 6.2.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + + 1024 + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + 20 + + + 200 + + + + + + + + + + + + + + + + false + + + 2 + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + add-unknown-fields-to-the-schema + + + + + + + true + ignored_ + _text_ + + + + + + + + + + + + + + explicit + true + + + + + + + + + text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + + string + elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + yyyy-MM-dd'T'HH:mm:ss.SSSZ + yyyy-MM-dd'T'HH:mm:ss,SSSZ + yyyy-MM-dd'T'HH:mm:ss.SSS + yyyy-MM-dd'T'HH:mm:ss,SSS + yyyy-MM-dd'T'HH:mm:ssZ + yyyy-MM-dd'T'HH:mm:ss + yyyy-MM-dd'T'HH:mmZ + yyyy-MM-dd'T'HH:mm + yyyy-MM-dd HH:mm:ss.SSSZ + yyyy-MM-dd HH:mm:ss,SSSZ + yyyy-MM-dd HH:mm:ss.SSS + yyyy-MM-dd HH:mm:ss,SSS + yyyy-MM-dd HH:mm:ssZ + yyyy-MM-dd HH:mm:ss + yyyy-MM-dd HH:mmZ + yyyy-MM-dd HH:mm + yyyy-MM-dd + + + + strings + + java.lang.Boolean + booleans + + + java.util.Date + tdates + + + java.lang.Long + java.lang.Integer + tlongs + + + java.lang.Number + tdoubles + + + + + + + + + + + + + + + + + + + + + text/plain; charset=UTF-8 + + + + + ${velocity.template.base.dir:} + ${velocity.solr.resource.loader.enabled:true} + ${velocity.params.resource.loader.enabled:false} + + + + + 5 + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/solr/conf/scripts.conf b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/stopwords.txt similarity index 84% rename from KeywordSearch/release/solr/solr/conf/scripts.conf rename to KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/stopwords.txt index 7be01a6bee..ae1e83eeb3 100644 --- a/KeywordSearch/release/solr/solr/conf/scripts.conf +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/stopwords.txt @@ -12,13 +12,3 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - -user= -solr_hostname=localhost -solr_port=9293 -rsyncd_port=19293 -data_dir= -webapp_name=solr -master_host= -master_data_dir= -master_status_dir= diff --git a/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/synonyms.txt b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/synonyms.txt new file mode 100644 index 0000000000..7f72128303 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/data_driven_schema_configs/conf/synonyms.txt @@ -0,0 +1,29 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +#some test synonym mappings unlikely to appear in real input text +aaafoo => aaabar +bbbfoo => bbbfoo bbbbar +cccfoo => cccbar cccbaz +fooaaa,baraaa,bazaaa + +# Some synonym groups specific to this example +GB,gib,gigabyte,gigabytes +MB,mib,megabyte,megabytes +Television, Televisions, TV, TVs +#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming +#after us won't split it into two words. + +# Synonym mappings can be used for spelling correction too +pixima => pixma + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_rest_managed.json b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_rest_managed.json new file mode 100644 index 0000000000..6a4aec39ed --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_rest_managed.json @@ -0,0 +1 @@ +{"initArgs":{},"managedList":[]} diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_schema_analysis_stopwords_english.json b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_schema_analysis_stopwords_english.json new file mode 100644 index 0000000000..a694e5c376 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_schema_analysis_stopwords_english.json @@ -0,0 +1,38 @@ +{ + "initArgs":{"ignoreCase":true}, + "managedList":[ + "a", + "an", + "and", + "are", + "as", + "at", + "be", + "but", + "by", + "for", + "if", + "in", + "into", + "is", + "it", + "no", + "not", + "of", + "on", + "or", + "stopworda", + "stopwordb", + "such", + "that", + "the", + "their", + "then", + "there", + "these", + "they", + "this", + "to", + "was", + "will", + "with"]} diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_schema_analysis_synonyms_english.json b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_schema_analysis_synonyms_english.json new file mode 100644 index 0000000000..869bdce051 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/_schema_analysis_synonyms_english.json @@ -0,0 +1,11 @@ +{ + "initArgs":{ + "ignoreCase":true, + "format":"solr" + }, + "managedMap":{ + "GB":["GiB","Gigabyte"], + "happy":["glad","joyful"], + "TV":["Television"] + } +} diff --git a/KeywordSearch/release/solr/solr/conf/admin-extra.html b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.html similarity index 77% rename from KeywordSearch/release/solr/solr/conf/admin-extra.html rename to KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.html index aa739da862..fecab20513 100644 --- a/KeywordSearch/release/solr/solr/conf/admin-extra.html +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.html @@ -15,17 +15,10 @@ limitations under the License. --> - diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.menu-bottom.html b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.menu-bottom.html new file mode 100644 index 0000000000..3359a460a4 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.menu-bottom.html @@ -0,0 +1,25 @@ + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.menu-top.html b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.menu-top.html new file mode 100644 index 0000000000..0886cee37a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/admin-extra.menu-top.html @@ -0,0 +1,25 @@ + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/README.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/README.txt new file mode 100644 index 0000000000..3d90ec72d4 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/README.txt @@ -0,0 +1,11 @@ +An override location of the clustering algorithm's resources +attribute definitions and lexical resources. + +A directory from which to load algorithm-specific stop words, +stop labels and attribute definition XMLs. + +For an overview of Carrot2 lexical resources, see: +http://download.carrot2.org/head/manual/#chapter.lexical-resources + +For an overview of Lingo3G lexical resources, see: +http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/kmeans-attributes.xml b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/kmeans-attributes.xml new file mode 100644 index 0000000000..d802465f66 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/kmeans-attributes.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/lingo-attributes.xml b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/lingo-attributes.xml new file mode 100644 index 0000000000..4bf13608b3 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/lingo-attributes.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/stc-attributes.xml b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/stc-attributes.xml new file mode 100644 index 0000000000..c1bf110c8f --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/clustering/carrot2/stc-attributes.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/currency.xml b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/currency.xml new file mode 100644 index 0000000000..3a9c58afee --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/currency.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/elevate.xml b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/elevate.xml new file mode 100644 index 0000000000..2c09ebed66 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/elevate.xml @@ -0,0 +1,42 @@ + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_ca.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_ca.txt new file mode 100644 index 0000000000..307a85f913 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_ca.txt @@ -0,0 +1,8 @@ +# Set of Catalan contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +d +l +m +n +s +t diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_fr.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_fr.txt new file mode 100644 index 0000000000..f1bba51b23 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_fr.txt @@ -0,0 +1,15 @@ +# Set of French contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +l +m +t +qu +n +s +j +d +c +jusqu +quoiqu +lorsqu +puisqu diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_ga.txt new file mode 100644 index 0000000000..9ebe7fa349 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_ga.txt @@ -0,0 +1,5 @@ +# Set of Irish contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +d +m +b diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_it.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_it.txt new file mode 100644 index 0000000000..cac0409537 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/contractions_it.txt @@ -0,0 +1,23 @@ +# Set of Italian contractions for ElisionFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +c +l +all +dall +dell +nell +sull +coll +pell +gl +agl +dagl +degl +negl +sugl +un +m +t +s +v +d diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/hyphenations_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/hyphenations_ga.txt new file mode 100644 index 0000000000..4d2642cc5a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/hyphenations_ga.txt @@ -0,0 +1,5 @@ +# Set of Irish hyphenations for StopFilter +# TODO: load this as a resource from the analyzer and sync it in build.xml +h +n +t diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stemdict_nl.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stemdict_nl.txt new file mode 100644 index 0000000000..441072971d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stemdict_nl.txt @@ -0,0 +1,6 @@ +# Set of overrides for the dutch stemmer +# TODO: load this as a resource from the analyzer and sync it in build.xml +fiets fiets +bromfiets bromfiets +ei eier +kind kinder diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stoptags_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stoptags_ja.txt new file mode 100644 index 0000000000..71b750845e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stoptags_ja.txt @@ -0,0 +1,420 @@ +# +# This file defines a Japanese stoptag set for JapanesePartOfSpeechStopFilter. +# +# Any token with a part-of-speech tag that exactly matches those defined in this +# file are removed from the token stream. +# +# Set your own stoptags by uncommenting the lines below. Note that comments are +# not allowed on the same line as a stoptag. See LUCENE-3745 for frequency lists, +# etc. that can be useful for building you own stoptag set. +# +# The entire possible tagset is provided below for convenience. +# +##### +# noun: unclassified nouns +#名詞 +# +# noun-common: Common nouns or nouns where the sub-classification is undefined +#名詞-一般 +# +# noun-proper: Proper nouns where the sub-classification is undefined +#名詞-固有名詞 +# +# noun-proper-misc: miscellaneous proper nouns +#名詞-固有名詞-一般 +# +# noun-proper-person: Personal names where the sub-classification is undefined +#名詞-固有名詞-人名 +# +# noun-proper-person-misc: names that cannot be divided into surname and +# given name; foreign names; names where the surname or given name is unknown. +# e.g. お市の方 +#名詞-固有名詞-人名-一般 +# +# noun-proper-person-surname: Mainly Japanese surnames. +# e.g. 山田 +#名詞-固有名詞-人名-姓 +# +# noun-proper-person-given_name: Mainly Japanese given names. +# e.g. 太郎 +#名詞-固有名詞-人名-名 +# +# noun-proper-organization: Names representing organizations. +# e.g. 通産省, NHK +#名詞-固有名詞-組織 +# +# noun-proper-place: Place names where the sub-classification is undefined +#名詞-固有名詞-地域 +# +# noun-proper-place-misc: Place names excluding countries. +# e.g. アジア, バルセロナ, 京都 +#名詞-固有名詞-地域-一般 +# +# noun-proper-place-country: Country names. +# e.g. 日本, オーストラリア +#名詞-固有名詞-地域-国 +# +# noun-pronoun: Pronouns where the sub-classification is undefined +#名詞-代名詞 +# +# noun-pronoun-misc: miscellaneous pronouns: +# e.g. それ, ここ, あいつ, あなた, あちこち, いくつ, どこか, なに, みなさん, みんな, わたくし, われわれ +#名詞-代名詞-一般 +# +# noun-pronoun-contraction: Spoken language contraction made by combining a +# pronoun and the particle 'wa'. +# e.g. ありゃ, こりゃ, こりゃあ, そりゃ, そりゃあ +#名詞-代名詞-縮約 +# +# noun-adverbial: Temporal nouns such as names of days or months that behave +# like adverbs. Nouns that represent amount or ratios and can be used adverbially, +# e.g. 金曜, 一月, 午後, 少量 +#名詞-副詞可能 +# +# noun-verbal: Nouns that take arguments with case and can appear followed by +# 'suru' and related verbs (する, できる, なさる, くださる) +# e.g. インプット, 愛着, 悪化, 悪戦苦闘, 一安心, 下取り +#名詞-サ変接続 +# +# noun-adjective-base: The base form of adjectives, words that appear before な ("na") +# e.g. 健康, 安易, 駄目, だめ +#名詞-形容動詞語幹 +# +# noun-numeric: Arabic numbers, Chinese numerals, and counters like 何 (回), 数. +# e.g. 0, 1, 2, 何, 数, 幾 +#名詞-数 +# +# noun-affix: noun affixes where the sub-classification is undefined +#名詞-非自立 +# +# noun-affix-misc: Of adnominalizers, the case-marker の ("no"), and words that +# attach to the base form of inflectional words, words that cannot be classified +# into any of the other categories below. This category includes indefinite nouns. +# e.g. あかつき, 暁, かい, 甲斐, 気, きらい, 嫌い, くせ, 癖, こと, 事, ごと, 毎, しだい, 次第, +# 順, せい, 所為, ついで, 序で, つもり, 積もり, 点, どころ, の, はず, 筈, はずみ, 弾み, +# 拍子, ふう, ふり, 振り, ほう, 方, 旨, もの, 物, 者, ゆえ, 故, ゆえん, 所以, わけ, 訳, +# わり, 割り, 割, ん-口語/, もん-口語/ +#名詞-非自立-一般 +# +# noun-affix-adverbial: noun affixes that that can behave as adverbs. +# e.g. あいだ, 間, あげく, 挙げ句, あと, 後, 余り, 以外, 以降, 以後, 以上, 以前, 一方, うえ, +# 上, うち, 内, おり, 折り, かぎり, 限り, きり, っきり, 結果, ころ, 頃, さい, 際, 最中, さなか, +# 最中, じたい, 自体, たび, 度, ため, 為, つど, 都度, とおり, 通り, とき, 時, ところ, 所, +# とたん, 途端, なか, 中, のち, 後, ばあい, 場合, 日, ぶん, 分, ほか, 他, まえ, 前, まま, +# 儘, 侭, みぎり, 矢先 +#名詞-非自立-副詞可能 +# +# noun-affix-aux: noun affixes treated as 助動詞 ("auxiliary verb") in school grammars +# with the stem よう(だ) ("you(da)"). +# e.g. よう, やう, 様 (よう) +#名詞-非自立-助動詞語幹 +# +# noun-affix-adjective-base: noun affixes that can connect to the indeclinable +# connection form な (aux "da"). +# e.g. みたい, ふう +#名詞-非自立-形容動詞語幹 +# +# noun-special: special nouns where the sub-classification is undefined. +#名詞-特殊 +# +# noun-special-aux: The そうだ ("souda") stem form that is used for reporting news, is +# treated as 助動詞 ("auxiliary verb") in school grammars, and attach to the base +# form of inflectional words. +# e.g. そう +#名詞-特殊-助動詞語幹 +# +# noun-suffix: noun suffixes where the sub-classification is undefined. +#名詞-接尾 +# +# noun-suffix-misc: Of the nouns or stem forms of other parts of speech that connect +# to ガル or タイ and can combine into compound nouns, words that cannot be classified into +# any of the other categories below. In general, this category is more inclusive than +# 接尾語 ("suffix") and is usually the last element in a compound noun. +# e.g. おき, かた, 方, 甲斐 (がい), がかり, ぎみ, 気味, ぐるみ, (~した) さ, 次第, 済 (ず) み, +# よう, (でき)っこ, 感, 観, 性, 学, 類, 面, 用 +#名詞-接尾-一般 +# +# noun-suffix-person: Suffixes that form nouns and attach to person names more often +# than other nouns. +# e.g. 君, 様, 著 +#名詞-接尾-人名 +# +# noun-suffix-place: Suffixes that form nouns and attach to place names more often +# than other nouns. +# e.g. 町, 市, 県 +#名詞-接尾-地域 +# +# noun-suffix-verbal: Of the suffixes that attach to nouns and form nouns, those that +# can appear before スル ("suru"). +# e.g. 化, 視, 分け, 入り, 落ち, 買い +#名詞-接尾-サ変接続 +# +# noun-suffix-aux: The stem form of そうだ (様態) that is used to indicate conditions, +# is treated as 助動詞 ("auxiliary verb") in school grammars, and attach to the +# conjunctive form of inflectional words. +# e.g. そう +#名詞-接尾-助動詞語幹 +# +# noun-suffix-adjective-base: Suffixes that attach to other nouns or the conjunctive +# form of inflectional words and appear before the copula だ ("da"). +# e.g. 的, げ, がち +#名詞-接尾-形容動詞語幹 +# +# noun-suffix-adverbial: Suffixes that attach to other nouns and can behave as adverbs. +# e.g. 後 (ご), 以後, 以降, 以前, 前後, 中, 末, 上, 時 (じ) +#名詞-接尾-副詞可能 +# +# noun-suffix-classifier: Suffixes that attach to numbers and form nouns. This category +# is more inclusive than 助数詞 ("classifier") and includes common nouns that attach +# to numbers. +# e.g. 個, つ, 本, 冊, パーセント, cm, kg, カ月, か国, 区画, 時間, 時半 +#名詞-接尾-助数詞 +# +# noun-suffix-special: Special suffixes that mainly attach to inflecting words. +# e.g. (楽し) さ, (考え) 方 +#名詞-接尾-特殊 +# +# noun-suffix-conjunctive: Nouns that behave like conjunctions and join two words +# together. +# e.g. (日本) 対 (アメリカ), 対 (アメリカ), (3) 対 (5), (女優) 兼 (主婦) +#名詞-接続詞的 +# +# noun-verbal_aux: Nouns that attach to the conjunctive particle て ("te") and are +# semantically verb-like. +# e.g. ごらん, ご覧, 御覧, 頂戴 +#名詞-動詞非自立的 +# +# noun-quotation: text that cannot be segmented into words, proverbs, Chinese poetry, +# dialects, English, etc. Currently, the only entry for 名詞 引用文字列 ("noun quotation") +# is いわく ("iwaku"). +#名詞-引用文字列 +# +# noun-nai_adjective: Words that appear before the auxiliary verb ない ("nai") and +# behave like an adjective. +# e.g. 申し訳, 仕方, とんでも, 違い +#名詞-ナイ形容詞語幹 +# +##### +# prefix: unclassified prefixes +#接頭詞 +# +# prefix-nominal: Prefixes that attach to nouns (including adjective stem forms) +# excluding numerical expressions. +# e.g. お (水), 某 (氏), 同 (社), 故 (~氏), 高 (品質), お (見事), ご (立派) +#接頭詞-名詞接続 +# +# prefix-verbal: Prefixes that attach to the imperative form of a verb or a verb +# in conjunctive form followed by なる/なさる/くださる. +# e.g. お (読みなさい), お (座り) +#接頭詞-動詞接続 +# +# prefix-adjectival: Prefixes that attach to adjectives. +# e.g. お (寒いですねえ), バカ (でかい) +#接頭詞-形容詞接続 +# +# prefix-numerical: Prefixes that attach to numerical expressions. +# e.g. 約, およそ, 毎時 +#接頭詞-数接続 +# +##### +# verb: unclassified verbs +#動詞 +# +# verb-main: +#動詞-自立 +# +# verb-auxiliary: +#動詞-非自立 +# +# verb-suffix: +#動詞-接尾 +# +##### +# adjective: unclassified adjectives +#形容詞 +# +# adjective-main: +#形容詞-自立 +# +# adjective-auxiliary: +#形容詞-非自立 +# +# adjective-suffix: +#形容詞-接尾 +# +##### +# adverb: unclassified adverbs +#副詞 +# +# adverb-misc: Words that can be segmented into one unit and where adnominal +# modification is not possible. +# e.g. あいかわらず, 多分 +#副詞-一般 +# +# adverb-particle_conjunction: Adverbs that can be followed by の, は, に, +# な, する, だ, etc. +# e.g. こんなに, そんなに, あんなに, なにか, なんでも +#副詞-助詞類接続 +# +##### +# adnominal: Words that only have noun-modifying forms. +# e.g. この, その, あの, どの, いわゆる, なんらかの, 何らかの, いろんな, こういう, そういう, ああいう, +# どういう, こんな, そんな, あんな, どんな, 大きな, 小さな, おかしな, ほんの, たいした, +# 「(, も) さる (ことながら)」, 微々たる, 堂々たる, 単なる, いかなる, 我が」「同じ, 亡き +#連体詞 +# +##### +# conjunction: Conjunctions that can occur independently. +# e.g. が, けれども, そして, じゃあ, それどころか +接続詞 +# +##### +# particle: unclassified particles. +助詞 +# +# particle-case: case particles where the subclassification is undefined. +助詞-格助詞 +# +# particle-case-misc: Case particles. +# e.g. から, が, で, と, に, へ, より, を, の, にて +助詞-格助詞-一般 +# +# particle-case-quote: the "to" that appears after nouns, a person’s speech, +# quotation marks, expressions of decisions from a meeting, reasons, judgements, +# conjectures, etc. +# e.g. ( だ) と (述べた.), ( である) と (して執行猶予...) +助詞-格助詞-引用 +# +# particle-case-compound: Compounds of particles and verbs that mainly behave +# like case particles. +# e.g. という, といった, とかいう, として, とともに, と共に, でもって, にあたって, に当たって, に当って, +# にあたり, に当たり, に当り, に当たる, にあたる, において, に於いて,に於て, における, に於ける, +# にかけ, にかけて, にかんし, に関し, にかんして, に関して, にかんする, に関する, に際し, +# に際して, にしたがい, に従い, に従う, にしたがって, に従って, にたいし, に対し, にたいして, +# に対して, にたいする, に対する, について, につき, につけ, につけて, につれ, につれて, にとって, +# にとり, にまつわる, によって, に依って, に因って, により, に依り, に因り, による, に依る, に因る, +# にわたって, にわたる, をもって, を以って, を通じ, を通じて, を通して, をめぐって, をめぐり, をめぐる, +# って-口語/, ちゅう-関西弁「という」/, (何) ていう (人)-口語/, っていう-口語/, といふ, とかいふ +助詞-格助詞-連語 +# +# particle-conjunctive: +# e.g. から, からには, が, けれど, けれども, けど, し, つつ, て, で, と, ところが, どころか, とも, ども, +# ながら, なり, ので, のに, ば, ものの, や ( した), やいなや, (ころん) じゃ(いけない)-口語/, +# (行っ) ちゃ(いけない)-口語/, (言っ) たって (しかたがない)-口語/, (それがなく)ったって (平気)-口語/ +助詞-接続助詞 +# +# particle-dependency: +# e.g. こそ, さえ, しか, すら, は, も, ぞ +助詞-係助詞 +# +# particle-adverbial: +# e.g. がてら, かも, くらい, 位, ぐらい, しも, (学校) じゃ(これが流行っている)-口語/, +# (それ)じゃあ (よくない)-口語/, ずつ, (私) なぞ, など, (私) なり (に), (先生) なんか (大嫌い)-口語/, +# (私) なんぞ, (先生) なんて (大嫌い)-口語/, のみ, だけ, (私) だって-口語/, だに, +# (彼)ったら-口語/, (お茶) でも (いかが), 等 (とう), (今後) とも, ばかり, ばっか-口語/, ばっかり-口語/, +# ほど, 程, まで, 迄, (誰) も (が)([助詞-格助詞] および [助詞-係助詞] の前に位置する「も」) +助詞-副助詞 +# +# particle-interjective: particles with interjective grammatical roles. +# e.g. (松島) や +助詞-間投助詞 +# +# particle-coordinate: +# e.g. と, たり, だの, だり, とか, なり, や, やら +助詞-並立助詞 +# +# particle-final: +# e.g. かい, かしら, さ, ぜ, (だ)っけ-口語/, (とまってる) で-方言/, な, ナ, なあ-口語/, ぞ, ね, ネ, +# ねぇ-口語/, ねえ-口語/, ねん-方言/, の, のう-口語/, や, よ, ヨ, よぉ-口語/, わ, わい-口語/ +助詞-終助詞 +# +# particle-adverbial/conjunctive/final: The particle "ka" when unknown whether it is +# adverbial, conjunctive, or sentence final. For example: +# (a) 「A か B か」. Ex:「(国内で運用する) か,(海外で運用する) か (.)」 +# (b) Inside an adverb phrase. Ex:「(幸いという) か (, 死者はいなかった.)」 +# 「(祈りが届いたせい) か (, 試験に合格した.)」 +# (c) 「かのように」. Ex:「(何もなかった) か (のように振る舞った.)」 +# e.g. か +助詞-副助詞/並立助詞/終助詞 +# +# particle-adnominalizer: The "no" that attaches to nouns and modifies +# non-inflectional words. +助詞-連体化 +# +# particle-adnominalizer: The "ni" and "to" that appear following nouns and adverbs +# that are giongo, giseigo, or gitaigo. +# e.g. に, と +助詞-副詞化 +# +# particle-special: A particle that does not fit into one of the above classifications. +# This includes particles that are used in Tanka, Haiku, and other poetry. +# e.g. かな, けむ, ( しただろう) に, (あんた) にゃ(わからん), (俺) ん (家) +助詞-特殊 +# +##### +# auxiliary-verb: +助動詞 +# +##### +# interjection: Greetings and other exclamations. +# e.g. おはよう, おはようございます, こんにちは, こんばんは, ありがとう, どうもありがとう, ありがとうございます, +# いただきます, ごちそうさま, さよなら, さようなら, はい, いいえ, ごめん, ごめんなさい +#感動詞 +# +##### +# symbol: unclassified Symbols. +記号 +# +# symbol-misc: A general symbol not in one of the categories below. +# e.g. [○◎@$〒→+] +記号-一般 +# +# symbol-comma: Commas +# e.g. [,、] +記号-読点 +# +# symbol-period: Periods and full stops. +# e.g. [..。] +記号-句点 +# +# symbol-space: Full-width whitespace. +記号-空白 +# +# symbol-open_bracket: +# e.g. [({‘“『【] +記号-括弧開 +# +# symbol-close_bracket: +# e.g. [)}’”』」】] +記号-括弧閉 +# +# symbol-alphabetic: +#記号-アルファベット +# +##### +# other: unclassified other +#その他 +# +# other-interjection: Words that are hard to classify as noun-suffixes or +# sentence-final particles. +# e.g. (だ)ァ +その他-間投 +# +##### +# filler: Aizuchi that occurs during a conversation or sounds inserted as filler. +# e.g. あの, うんと, えと +フィラー +# +##### +# non-verbal: non-verbal sound. +非言語音 +# +##### +# fragment: +#語断片 +# +##### +# unknown: unknown part of speech. +#未知語 +# +##### End of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ar.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ar.txt new file mode 100644 index 0000000000..046829db6a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ar.txt @@ -0,0 +1,125 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +# Cleaned on October 11, 2009 (not normalized, so use before normalization) +# This means that when modifying this list, you might need to add some +# redundant entries, for example containing forms with both أ and ا +من +ومن +منها +منه +في +وفي +فيها +فيه +و +ف +ثم +او +أو +ب +بها +به +ا +أ +اى +اي +أي +أى +لا +ولا +الا +ألا +إلا +لكن +ما +وما +كما +فما +عن +مع +اذا +إذا +ان +أن +إن +انها +أنها +إنها +انه +أنه +إنه +بان +بأن +فان +فأن +وان +وأن +وإن +التى +التي +الذى +الذي +الذين +الى +الي +إلى +إلي +على +عليها +عليه +اما +أما +إما +ايضا +أيضا +كل +وكل +لم +ولم +لن +ولن +هى +هي +هو +وهى +وهي +وهو +فهى +فهي +فهو +انت +أنت +لك +لها +له +هذه +هذا +تلك +ذلك +هناك +كانت +كان +يكون +تكون +وكانت +وكان +غير +بعض +قد +نحو +بين +بينما +منذ +ضمن +حيث +الان +الآن +خلال +بعد +قبل +حتى +عند +عندما +لدى +جميع diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_bg.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_bg.txt new file mode 100644 index 0000000000..1ae4ba2ae3 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_bg.txt @@ -0,0 +1,193 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +а +аз +ако +ала +бе +без +беше +би +бил +била +били +било +близо +бъдат +бъде +бяха +в +вас +ваш +ваша +вероятно +вече +взема +ви +вие +винаги +все +всеки +всички +всичко +всяка +във +въпреки +върху +г +ги +главно +го +д +да +дали +до +докато +докога +дори +досега +доста +е +едва +един +ето +за +зад +заедно +заради +засега +затова +защо +защото +и +из +или +им +има +имат +иска +й +каза +как +каква +какво +както +какъв +като +кога +когато +което +които +кой +който +колко +която +къде +където +към +ли +м +ме +между +мен +ми +мнозина +мога +могат +може +моля +момента +му +н +на +над +назад +най +направи +напред +например +нас +не +него +нея +ни +ние +никой +нито +но +някои +някой +няма +обаче +около +освен +особено +от +отгоре +отново +още +пак +по +повече +повечето +под +поне +поради +после +почти +прави +пред +преди +през +при +пък +първо +с +са +само +се +сега +си +скоро +след +сме +според +сред +срещу +сте +съм +със +също +т +тази +така +такива +такъв +там +твой +те +тези +ти +тн +то +това +тогава +този +той +толкова +точно +трябва +тук +тъй +тя +тях +у +харесва +ч +че +често +чрез +ще +щом +я diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ca.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ca.txt new file mode 100644 index 0000000000..3da65deafe --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ca.txt @@ -0,0 +1,220 @@ +# Catalan stopwords from http://github.com/vcl/cue.language (Apache 2 Licensed) +a +abans +ací +ah +així +això +al +als +aleshores +algun +alguna +algunes +alguns +alhora +allà +allí +allò +altra +altre +altres +amb +ambdós +ambdues +apa +aquell +aquella +aquelles +aquells +aquest +aquesta +aquestes +aquests +aquí +baix +cada +cadascú +cadascuna +cadascunes +cadascuns +com +contra +d'un +d'una +d'unes +d'uns +dalt +de +del +dels +des +després +dins +dintre +donat +doncs +durant +e +eh +el +els +em +en +encara +ens +entre +érem +eren +éreu +es +és +esta +està +estàvem +estaven +estàveu +esteu +et +etc +ets +fins +fora +gairebé +ha +han +has +havia +he +hem +heu +hi +ho +i +igual +iguals +ja +l'hi +la +les +li +li'n +llavors +m'he +ma +mal +malgrat +mateix +mateixa +mateixes +mateixos +me +mentre +més +meu +meus +meva +meves +molt +molta +moltes +molts +mon +mons +n'he +n'hi +ne +ni +no +nogensmenys +només +nosaltres +nostra +nostre +nostres +o +oh +oi +on +pas +pel +pels +per +però +perquè +poc +poca +pocs +poques +potser +propi +qual +quals +quan +quant +que +què +quelcom +qui +quin +quina +quines +quins +s'ha +s'han +sa +semblant +semblants +ses +seu +seus +seva +seva +seves +si +sobre +sobretot +sóc +solament +sols +son +són +sons +sota +sou +t'ha +t'han +t'he +ta +tal +també +tampoc +tan +tant +tanta +tantes +teu +teus +teva +teves +ton +tons +tot +tota +totes +tots +un +una +unes +uns +us +va +vaig +vam +van +vas +veu +vosaltres +vostra +vostre +vostres diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ckb.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ckb.txt new file mode 100644 index 0000000000..87abf118fe --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ckb.txt @@ -0,0 +1,136 @@ +# set of kurdish stopwords +# note these have been normalized with our scheme (e represented with U+06D5, etc) +# constructed from: +# * Fig 5 of "Building A Test Collection For Sorani Kurdish" (Esmaili et al) +# * "Sorani Kurdish: A Reference Grammar with selected readings" (Thackston) +# * Corpus-based analysis of 77M word Sorani collection: wikipedia, news, blogs, etc + +# and +و +# which +کە +# of +ی +# made/did +کرد +# that/which +ئەوەی +# on/head +سەر +# two +دوو +# also +هەروەها +# from/that +لەو +# makes/does +دەکات +# some +چەند +# every +هەر + +# demonstratives +# that +ئەو +# this +ئەم + +# personal pronouns +# I +من +# we +ئێمە +# you +تۆ +# you +ئێوە +# he/she/it +ئەو +# they +ئەوان + +# prepositions +# to/with/by +بە +پێ +# without +بەبێ +# along with/while/during +بەدەم +# in the opinion of +بەلای +# according to +بەپێی +# before +بەرلە +# in the direction of +بەرەوی +# in front of/toward +بەرەوە +# before/in the face of +بەردەم +# without +بێ +# except for +بێجگە +# for +بۆ +# on/in +دە +تێ +# with +دەگەڵ +# after +دوای +# except for/aside from +جگە +# in/from +لە +لێ +# in front of/before/because of +لەبەر +# between/among +لەبەینی +# concerning/about +لەبابەت +# concerning +لەبارەی +# instead of +لەباتی +# beside +لەبن +# instead of +لەبرێتی +# behind +لەدەم +# with/together with +لەگەڵ +# by +لەلایەن +# within +لەناو +# between/among +لەنێو +# for the sake of +لەپێناوی +# with respect to +لەرەوی +# by means of/for +لەرێ +# for the sake of +لەرێگا +# on/on top of/according to +لەسەر +# under +لەژێر +# between/among +ناو +# between/among +نێوان +# after +پاش +# before +پێش +# like +وەک diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_cz.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_cz.txt new file mode 100644 index 0000000000..53c6097dac --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_cz.txt @@ -0,0 +1,172 @@ +a +s +k +o +i +u +v +z +dnes +cz +tímto +budeš +budem +byli +jseš +můj +svým +ta +tomto +tohle +tuto +tyto +jej +zda +proč +máte +tato +kam +tohoto +kdo +kteří +mi +nám +tom +tomuto +mít +nic +proto +kterou +byla +toho +protože +asi +ho +naši +napište +re +což +tím +takže +svých +její +svými +jste +aj +tu +tedy +teto +bylo +kde +ke +pravé +ji +nad +nejsou +či +pod +téma +mezi +přes +ty +pak +vám +ani +když +však +neg +jsem +tento +článku +články +aby +jsme +před +pta +jejich +byl +ještě +až +bez +také +pouze +první +vaše +která +nás +nový +tipy +pokud +může +strana +jeho +své +jiné +zprávy +nové +není +vás +jen +podle +zde +už +být +více +bude +již +než +který +by +které +co +nebo +ten +tak +má +při +od +po +jsou +jak +další +ale +si +se +ve +to +jako +za +zpět +ze +do +pro +je +na +atd +atp +jakmile +přičemž +já +on +ona +ono +oni +ony +my +vy +jí +ji +mě +mne +jemu +tomu +těm +těmu +němu +němuž +jehož +jíž +jelikož +jež +jakož +načež diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_da.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_da.txt new file mode 100644 index 0000000000..42e6145b98 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_da.txt @@ -0,0 +1,110 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/danish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Danish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + +og | and +i | in +jeg | I +det | that (dem. pronoun)/it (pers. pronoun) +at | that (in front of a sentence)/to (with infinitive) +en | a/an +den | it (pers. pronoun)/that (dem. pronoun) +til | to/at/for/until/against/by/of/into, more +er | present tense of "to be" +som | who, as +på | on/upon/in/on/at/to/after/of/with/for, on +de | they +med | with/by/in, along +han | he +af | of/by/from/off/for/in/with/on, off +for | at/for/to/from/by/of/ago, in front/before, because +ikke | not +der | who/which, there/those +var | past tense of "to be" +mig | me/myself +sig | oneself/himself/herself/itself/themselves +men | but +et | a/an/one, one (number), someone/somebody/one +har | present tense of "to have" +om | round/about/for/in/a, about/around/down, if +vi | we +min | my +havde | past tense of "to have" +ham | him +hun | she +nu | now +over | over/above/across/by/beyond/past/on/about, over/past +da | then, when/as/since +fra | from/off/since, off, since +du | you +ud | out +sin | his/her/its/one's +dem | them +os | us/ourselves +op | up +man | you/one +hans | his +hvor | where +eller | or +hvad | what +skal | must/shall etc. +selv | myself/youself/herself/ourselves etc., even +her | here +alle | all/everyone/everybody etc. +vil | will (verb) +blev | past tense of "to stay/to remain/to get/to become" +kunne | could +ind | in +når | when +være | present tense of "to be" +dog | however/yet/after all +noget | something +ville | would +jo | you know/you see (adv), yes +deres | their/theirs +efter | after/behind/according to/for/by/from, later/afterwards +ned | down +skulle | should +denne | this +end | than +dette | this +mit | my/mine +også | also +under | under/beneath/below/during, below/underneath +have | have +dig | you +anden | other +hende | her +mine | my +alt | everything +meget | much/very, plenty of +sit | his, her, its, one's +sine | his, her, its, one's +vor | our +mod | against +disse | these +hvis | if +din | your/yours +nogle | some +hos | by/at +blive | be/become +mange | many +ad | by/through +bliver | present tense of "to be/to become" +hendes | her/hers +været | be +thi | for (conj) +jer | you +sådan | such, like this/like that diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_de.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_de.txt new file mode 100644 index 0000000000..86525e7ae0 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_de.txt @@ -0,0 +1,294 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/german/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A German stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | The number of forms in this list is reduced significantly by passing it + | through the German stemmer. + + +aber | but + +alle | all +allem +allen +aller +alles + +als | than, as +also | so +am | an + dem +an | at + +ander | other +andere +anderem +anderen +anderer +anderes +anderm +andern +anderr +anders + +auch | also +auf | on +aus | out of +bei | by +bin | am +bis | until +bist | art +da | there +damit | with it +dann | then + +der | the +den +des +dem +die +das + +daß | that + +derselbe | the same +derselben +denselben +desselben +demselben +dieselbe +dieselben +dasselbe + +dazu | to that + +dein | thy +deine +deinem +deinen +deiner +deines + +denn | because + +derer | of those +dessen | of him + +dich | thee +dir | to thee +du | thou + +dies | this +diese +diesem +diesen +dieser +dieses + + +doch | (several meanings) +dort | (over) there + + +durch | through + +ein | a +eine +einem +einen +einer +eines + +einig | some +einige +einigem +einigen +einiger +einiges + +einmal | once + +er | he +ihn | him +ihm | to him + +es | it +etwas | something + +euer | your +eure +eurem +euren +eurer +eures + +für | for +gegen | towards +gewesen | p.p. of sein +hab | have +habe | have +haben | have +hat | has +hatte | had +hatten | had +hier | here +hin | there +hinter | behind + +ich | I +mich | me +mir | to me + + +ihr | you, to her +ihre +ihrem +ihren +ihrer +ihres +euch | to you + +im | in + dem +in | in +indem | while +ins | in + das +ist | is + +jede | each, every +jedem +jeden +jeder +jedes + +jene | that +jenem +jenen +jener +jenes + +jetzt | now +kann | can + +kein | no +keine +keinem +keinen +keiner +keines + +können | can +könnte | could +machen | do +man | one + +manche | some, many a +manchem +manchen +mancher +manches + +mein | my +meine +meinem +meinen +meiner +meines + +mit | with +muss | must +musste | had to +nach | to(wards) +nicht | not +nichts | nothing +noch | still, yet +nun | now +nur | only +ob | whether +oder | or +ohne | without +sehr | very + +sein | his +seine +seinem +seinen +seiner +seines + +selbst | self +sich | herself + +sie | they, she +ihnen | to them + +sind | are +so | so + +solche | such +solchem +solchen +solcher +solches + +soll | shall +sollte | should +sondern | but +sonst | else +über | over +um | about, around +und | and + +uns | us +unse +unsem +unsen +unser +unses + +unter | under +viel | much +vom | von + dem +von | from +vor | before +während | while +war | was +waren | were +warst | wast +was | what +weg | away, off +weil | because +weiter | further + +welche | which +welchem +welchen +welcher +welches + +wenn | when +werde | will +werden | will +wie | how +wieder | again +will | want +wir | we +wird | will +wirst | willst +wo | where +wollen | want +wollte | wanted +würde | would +würden | would +zu | to +zum | zu + dem +zur | zu + der +zwar | indeed +zwischen | between + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_el.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_el.txt new file mode 100644 index 0000000000..232681f5bd --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_el.txt @@ -0,0 +1,78 @@ +# Lucene Greek Stopwords list +# Note: by default this file is used after GreekLowerCaseFilter, +# so when modifying this file use 'σ' instead of 'ς' +ο +η +το +οι +τα +του +τησ +των +τον +την +και +κι +κ +ειμαι +εισαι +ειναι +ειμαστε +ειστε +στο +στον +στη +στην +μα +αλλα +απο +για +προσ +με +σε +ωσ +παρα +αντι +κατα +μετα +θα +να +δε +δεν +μη +μην +επι +ενω +εαν +αν +τοτε +που +πωσ +ποιοσ +ποια +ποιο +ποιοι +ποιεσ +ποιων +ποιουσ +αυτοσ +αυτη +αυτο +αυτοι +αυτων +αυτουσ +αυτεσ +αυτα +εκεινοσ +εκεινη +εκεινο +εκεινοι +εκεινεσ +εκεινα +εκεινων +εκεινουσ +οπωσ +ομωσ +ισωσ +οσο +οτι diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_en.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_en.txt new file mode 100644 index 0000000000..2c164c0b2a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_en.txt @@ -0,0 +1,54 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# a couple of test stopwords to test that the words are really being +# configured from this file: +stopworda +stopwordb + +# Standard english stop words taken from Lucene's StopAnalyzer +a +an +and +are +as +at +be +but +by +for +if +in +into +is +it +no +not +of +on +or +such +that +the +their +then +there +these +they +this +to +was +will +with diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_es.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_es.txt new file mode 100644 index 0000000000..487d78c8d5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_es.txt @@ -0,0 +1,356 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/spanish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Spanish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + + | The following is a ranked list (commonest to rarest) of stopwords + | deriving from a large sample of text. + + | Extra words have been added at the end. + +de | from, of +la | the, her +que | who, that +el | the +en | in +y | and +a | to +los | the, them +del | de + el +se | himself, from him etc +las | the, them +por | for, by, etc +un | a +para | for +con | with +no | no +una | a +su | his, her +al | a + el + | es from SER +lo | him +como | how +más | more +pero | pero +sus | su plural +le | to him, her +ya | already +o | or + | fue from SER +este | this + | ha from HABER +sí | himself etc +porque | because +esta | this + | son from SER +entre | between + | está from ESTAR +cuando | when +muy | very +sin | without +sobre | on + | ser from SER + | tiene from TENER +también | also +me | me +hasta | until +hay | there is/are +donde | where + | han from HABER +quien | whom, that + | están from ESTAR + | estado from ESTAR +desde | from +todo | all +nos | us +durante | during + | estados from ESTAR +todos | all +uno | a +les | to them +ni | nor +contra | against +otros | other + | fueron from SER +ese | that +eso | that + | había from HABER +ante | before +ellos | they +e | and (variant of y) +esto | this +mí | me +antes | before +algunos | some +qué | what? +unos | a +yo | I +otro | other +otras | other +otra | other +él | he +tanto | so much, many +esa | that +estos | these +mucho | much, many +quienes | who +nada | nothing +muchos | many +cual | who + | sea from SER +poco | few +ella | she +estar | to be + | haber from HABER +estas | these + | estaba from ESTAR + | estamos from ESTAR +algunas | some +algo | something +nosotros | we + + | other forms + +mi | me +mis | mi plural +tú | thou +te | thee +ti | thee +tu | thy +tus | tu plural +ellas | they +nosotras | we +vosotros | you +vosotras | you +os | you +mío | mine +mía | +míos | +mías | +tuyo | thine +tuya | +tuyos | +tuyas | +suyo | his, hers, theirs +suya | +suyos | +suyas | +nuestro | ours +nuestra | +nuestros | +nuestras | +vuestro | yours +vuestra | +vuestros | +vuestras | +esos | those +esas | those + + | forms of estar, to be (not including the infinitive): +estoy +estás +está +estamos +estáis +están +esté +estés +estemos +estéis +estén +estaré +estarás +estará +estaremos +estaréis +estarán +estaría +estarías +estaríamos +estaríais +estarían +estaba +estabas +estábamos +estabais +estaban +estuve +estuviste +estuvo +estuvimos +estuvisteis +estuvieron +estuviera +estuvieras +estuviéramos +estuvierais +estuvieran +estuviese +estuvieses +estuviésemos +estuvieseis +estuviesen +estando +estado +estada +estados +estadas +estad + + | forms of haber, to have (not including the infinitive): +he +has +ha +hemos +habéis +han +haya +hayas +hayamos +hayáis +hayan +habré +habrás +habrá +habremos +habréis +habrán +habría +habrías +habríamos +habríais +habrían +había +habías +habíamos +habíais +habían +hube +hubiste +hubo +hubimos +hubisteis +hubieron +hubiera +hubieras +hubiéramos +hubierais +hubieran +hubiese +hubieses +hubiésemos +hubieseis +hubiesen +habiendo +habido +habida +habidos +habidas + + | forms of ser, to be (not including the infinitive): +soy +eres +es +somos +sois +son +sea +seas +seamos +seáis +sean +seré +serás +será +seremos +seréis +serán +sería +serías +seríamos +seríais +serían +era +eras +éramos +erais +eran +fui +fuiste +fue +fuimos +fuisteis +fueron +fuera +fueras +fuéramos +fuerais +fueran +fuese +fueses +fuésemos +fueseis +fuesen +siendo +sido + | sed also means 'thirst' + + | forms of tener, to have (not including the infinitive): +tengo +tienes +tiene +tenemos +tenéis +tienen +tenga +tengas +tengamos +tengáis +tengan +tendré +tendrás +tendrá +tendremos +tendréis +tendrán +tendría +tendrías +tendríamos +tendríais +tendrían +tenía +tenías +teníamos +teníais +tenían +tuve +tuviste +tuvo +tuvimos +tuvisteis +tuvieron +tuviera +tuvieras +tuviéramos +tuvierais +tuvieran +tuviese +tuvieses +tuviésemos +tuvieseis +tuviesen +teniendo +tenido +tenida +tenidos +tenidas +tened + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_eu.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_eu.txt new file mode 100644 index 0000000000..25f1db9346 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_eu.txt @@ -0,0 +1,99 @@ +# example set of basque stopwords +al +anitz +arabera +asko +baina +bat +batean +batek +bati +batzuei +batzuek +batzuetan +batzuk +bera +beraiek +berau +berauek +bere +berori +beroriek +beste +bezala +da +dago +dira +ditu +du +dute +edo +egin +ere +eta +eurak +ez +gainera +gu +gutxi +guzti +haiei +haiek +haietan +hainbeste +hala +han +handik +hango +hara +hari +hark +hartan +hau +hauei +hauek +hauetan +hemen +hemendik +hemengo +hi +hona +honek +honela +honetan +honi +hor +hori +horiei +horiek +horietan +horko +horra +horrek +horrela +horretan +horri +hortik +hura +izan +ni +noiz +nola +non +nondik +nongo +nor +nora +ze +zein +zen +zenbait +zenbat +zer +zergatik +ziren +zituen +zu +zuek +zuen +zuten diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fa.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fa.txt new file mode 100644 index 0000000000..723641c6da --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fa.txt @@ -0,0 +1,313 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +# Note: by default this file is used after normalization, so when adding entries +# to this file, use the arabic 'ي' instead of 'ی' +انان +نداشته +سراسر +خياه +ايشان +وي +تاكنون +بيشتري +دوم +پس +ناشي +وگو +يا +داشتند +سپس +هنگام +هرگز +پنج +نشان +امسال +ديگر +گروهي +شدند +چطور +ده +و +دو +نخستين +ولي +چرا +چه +وسط +ه +كدام +قابل +يك +رفت +هفت +همچنين +در +هزار +بله +بلي +شايد +اما +شناسي +گرفته +دهد +داشته +دانست +داشتن +خواهيم +ميليارد +وقتيكه +امد +خواهد +جز +اورده +شده +بلكه +خدمات +شدن +برخي +نبود +بسياري +جلوگيري +حق +كردند +نوعي +بعري +نكرده +نظير +نبايد +بوده +بودن +داد +اورد +هست +جايي +شود +دنبال +داده +بايد +سابق +هيچ +همان +انجا +كمتر +كجاست +گردد +كسي +تر +مردم +تان +دادن +بودند +سري +جدا +ندارند +مگر +يكديگر +دارد +دهند +بنابراين +هنگامي +سمت +جا +انچه +خود +دادند +زياد +دارند +اثر +بدون +بهترين +بيشتر +البته +به +براساس +بيرون +كرد +بعضي +گرفت +توي +اي +ميليون +او +جريان +تول +بر +مانند +برابر +باشيم +مدتي +گويند +اكنون +تا +تنها +جديد +چند +بي +نشده +كردن +كردم +گويد +كرده +كنيم +نمي +نزد +روي +قصد +فقط +بالاي +ديگران +اين +ديروز +توسط +سوم +ايم +دانند +سوي +استفاده +شما +كنار +داريم +ساخته +طور +امده +رفته +نخست +بيست +نزديك +طي +كنيد +از +انها +تمامي +داشت +يكي +طريق +اش +چيست +روب +نمايد +گفت +چندين +چيزي +تواند +ام +ايا +با +ان +ايد +ترين +اينكه +ديگري +راه +هايي +بروز +همچنان +پاعين +كس +حدود +مختلف +مقابل +چيز +گيرد +ندارد +ضد +همچون +سازي +شان +مورد +باره +مرسي +خويش +برخوردار +چون +خارج +شش +هنوز +تحت +ضمن +هستيم +گفته +فكر +بسيار +پيش +براي +روزهاي +انكه +نخواهد +بالا +كل +وقتي +كي +چنين +كه +گيري +نيست +است +كجا +كند +نيز +يابد +بندي +حتي +توانند +عقب +خواست +كنند +بين +تمام +همه +ما +باشند +مثل +شد +اري +باشد +اره +طبق +بعد +اگر +صورت +غير +جاي +بيش +ريزي +اند +زيرا +چگونه +بار +لطفا +مي +درباره +من +ديده +همين +گذاري +برداري +علت +گذاشته +هم +فوق +نه +ها +شوند +اباد +همواره +هر +اول +خواهند +چهار +نام +امروز +مان +هاي +قبل +كنم +سعي +تازه +را +هستند +زير +جلوي +عنوان +بود diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fi.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fi.txt new file mode 100644 index 0000000000..4372c9a055 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fi.txt @@ -0,0 +1,97 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/finnish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + +| forms of BE + +olla +olen +olet +on +olemme +olette +ovat +ole | negative form + +oli +olisi +olisit +olisin +olisimme +olisitte +olisivat +olit +olin +olimme +olitte +olivat +ollut +olleet + +en | negation +et +ei +emme +ette +eivät + +|Nom Gen Acc Part Iness Elat Illat Adess Ablat Allat Ess Trans +minä minun minut minua minussa minusta minuun minulla minulta minulle | I +sinä sinun sinut sinua sinussa sinusta sinuun sinulla sinulta sinulle | you +hän hänen hänet häntä hänessä hänestä häneen hänellä häneltä hänelle | he she +me meidän meidät meitä meissä meistä meihin meillä meiltä meille | we +te teidän teidät teitä teissä teistä teihin teillä teiltä teille | you +he heidän heidät heitä heissä heistä heihin heillä heiltä heille | they + +tämä tämän tätä tässä tästä tähän tallä tältä tälle tänä täksi | this +tuo tuon tuotä tuossa tuosta tuohon tuolla tuolta tuolle tuona tuoksi | that +se sen sitä siinä siitä siihen sillä siltä sille sinä siksi | it +nämä näiden näitä näissä näistä näihin näillä näiltä näille näinä näiksi | these +nuo noiden noita noissa noista noihin noilla noilta noille noina noiksi | those +ne niiden niitä niissä niistä niihin niillä niiltä niille niinä niiksi | they + +kuka kenen kenet ketä kenessä kenestä keneen kenellä keneltä kenelle kenenä keneksi| who +ketkä keiden ketkä keitä keissä keistä keihin keillä keiltä keille keinä keiksi | (pl) +mikä minkä minkä mitä missä mistä mihin millä miltä mille minä miksi | which what +mitkä | (pl) + +joka jonka jota jossa josta johon jolla jolta jolle jona joksi | who which +jotka joiden joita joissa joista joihin joilla joilta joille joina joiksi | (pl) + +| conjunctions + +että | that +ja | and +jos | if +koska | because +kuin | than +mutta | but +niin | so +sekä | and +sillä | for +tai | or +vaan | but +vai | or +vaikka | although + + +| prepositions + +kanssa | with +mukaan | according to +noin | about +poikki | across +yli | over, across + +| other + +kun | when +niin | so +nyt | now +itse | self + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fr.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fr.txt new file mode 100644 index 0000000000..749abae684 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_fr.txt @@ -0,0 +1,186 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/french/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A French stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + +au | a + le +aux | a + les +avec | with +ce | this +ces | these +dans | with +de | of +des | de + les +du | de + le +elle | she +en | `of them' etc +et | and +eux | them +il | he +je | I +la | the +le | the +leur | their +lui | him +ma | my (fem) +mais | but +me | me +même | same; as in moi-même (myself) etc +mes | me (pl) +moi | me +mon | my (masc) +ne | not +nos | our (pl) +notre | our +nous | we +on | one +ou | where +par | by +pas | not +pour | for +qu | que before vowel +que | that +qui | who +sa | his, her (fem) +se | oneself +ses | his (pl) +son | his, her (masc) +sur | on +ta | thy (fem) +te | thee +tes | thy (pl) +toi | thee +ton | thy (masc) +tu | thou +un | a +une | a +vos | your (pl) +votre | your +vous | you + + | single letter forms + +c | c' +d | d' +j | j' +l | l' +à | to, at +m | m' +n | n' +s | s' +t | t' +y | there + + | forms of être (not including the infinitive): +été +étée +étées +étés +étant +suis +es +est +sommes +êtes +sont +serai +seras +sera +serons +serez +seront +serais +serait +serions +seriez +seraient +étais +était +étions +étiez +étaient +fus +fut +fûmes +fûtes +furent +sois +soit +soyons +soyez +soient +fusse +fusses +fût +fussions +fussiez +fussent + + | forms of avoir (not including the infinitive): +ayant +eu +eue +eues +eus +ai +as +avons +avez +ont +aurai +auras +aura +aurons +aurez +auront +aurais +aurait +aurions +auriez +auraient +avais +avait +avions +aviez +avaient +eut +eûmes +eûtes +eurent +aie +aies +ait +ayons +ayez +aient +eusse +eusses +eût +eussions +eussiez +eussent + + | Later additions (from Jean-Christophe Deschamps) +ceci | this +cela | that +celà | that +cet | this +cette | this +ici | here +ils | they +les | the (pl) +leurs | their (pl) +quel | which +quels | which +quelle | which +quelles | which +sans | without +soi | oneself + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ga.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ga.txt new file mode 100644 index 0000000000..9ff88d747e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ga.txt @@ -0,0 +1,110 @@ + +a +ach +ag +agus +an +aon +ar +arna +as +b' +ba +beirt +bhúr +caoga +ceathair +ceathrar +chomh +chtó +chuig +chun +cois +céad +cúig +cúigear +d' +daichead +dar +de +deich +deichniúr +den +dhá +do +don +dtí +dá +dár +dó +faoi +faoin +faoina +faoinár +fara +fiche +gach +gan +go +gur +haon +hocht +i +iad +idir +in +ina +ins +inár +is +le +leis +lena +lenár +m' +mar +mo +mé +na +nach +naoi +naonúr +ná +ní +níor +nó +nócha +ocht +ochtar +os +roimh +sa +seacht +seachtar +seachtó +seasca +seisear +siad +sibh +sinn +sna +sé +sí +tar +thar +thú +triúr +trí +trína +trínár +tríocha +tú +um +ár +é +éis +í +ó +ón +óna +ónár diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_gl.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_gl.txt new file mode 100644 index 0000000000..d8760b12c1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_gl.txt @@ -0,0 +1,161 @@ +# galican stopwords +a +aínda +alí +aquel +aquela +aquelas +aqueles +aquilo +aquí +ao +aos +as +así +á +ben +cando +che +co +coa +comigo +con +connosco +contigo +convosco +coas +cos +cun +cuns +cunha +cunhas +da +dalgunha +dalgunhas +dalgún +dalgúns +das +de +del +dela +delas +deles +desde +deste +do +dos +dun +duns +dunha +dunhas +e +el +ela +elas +eles +en +era +eran +esa +esas +ese +eses +esta +estar +estaba +está +están +este +estes +estiven +estou +eu +é +facer +foi +foron +fun +había +hai +iso +isto +la +las +lle +lles +lo +los +mais +me +meu +meus +min +miña +miñas +moi +na +nas +neste +nin +no +non +nos +nosa +nosas +noso +nosos +nós +nun +nunha +nuns +nunhas +o +os +ou +ó +ós +para +pero +pode +pois +pola +polas +polo +polos +por +que +se +senón +ser +seu +seus +sexa +sido +sobre +súa +súas +tamén +tan +te +ten +teñen +teño +ter +teu +teus +ti +tido +tiña +tiven +túa +túas +un +unha +unhas +uns +vos +vosa +vosas +voso +vosos +vós diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hi.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hi.txt new file mode 100644 index 0000000000..86286bb083 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hi.txt @@ -0,0 +1,235 @@ +# Also see http://www.opensource.org/licenses/bsd-license.html +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# This file was created by Jacques Savoy and is distributed under the BSD license. +# Note: by default this file also contains forms normalized by HindiNormalizer +# for spelling variation (see section below), such that it can be used whether or +# not you enable that feature. When adding additional entries to this list, +# please add the normalized form as well. +अंदर +अत +अपना +अपनी +अपने +अभी +आदि +आप +इत्यादि +इन +इनका +इन्हीं +इन्हें +इन्हों +इस +इसका +इसकी +इसके +इसमें +इसी +इसे +उन +उनका +उनकी +उनके +उनको +उन्हीं +उन्हें +उन्हों +उस +उसके +उसी +उसे +एक +एवं +एस +ऐसे +और +कई +कर +करता +करते +करना +करने +करें +कहते +कहा +का +काफ़ी +कि +कितना +किन्हें +किन्हों +किया +किर +किस +किसी +किसे +की +कुछ +कुल +के +को +कोई +कौन +कौनसा +गया +घर +जब +जहाँ +जा +जितना +जिन +जिन्हें +जिन्हों +जिस +जिसे +जीधर +जैसा +जैसे +जो +तक +तब +तरह +तिन +तिन्हें +तिन्हों +तिस +तिसे +तो +था +थी +थे +दबारा +दिया +दुसरा +दूसरे +दो +द्वारा +न +नहीं +ना +निहायत +नीचे +ने +पर +पर +पहले +पूरा +पे +फिर +बनी +बही +बहुत +बाद +बाला +बिलकुल +भी +भीतर +मगर +मानो +मे +में +यदि +यह +यहाँ +यही +या +यिह +ये +रखें +रहा +रहे +ऱ्वासा +लिए +लिये +लेकिन +व +वर्ग +वह +वह +वहाँ +वहीं +वाले +वुह +वे +वग़ैरह +संग +सकता +सकते +सबसे +सभी +साथ +साबुत +साभ +सारा +से +सो +ही +हुआ +हुई +हुए +है +हैं +हो +होता +होती +होते +होना +होने +# additional normalized forms of the above +अपनि +जेसे +होति +सभि +तिंहों +इंहों +दवारा +इसि +किंहें +थि +उंहों +ओर +जिंहें +वहिं +अभि +बनि +हि +उंहिं +उंहें +हें +वगेरह +एसे +रवासा +कोन +निचे +काफि +उसि +पुरा +भितर +हे +बहि +वहां +कोइ +यहां +जिंहों +तिंहें +किसि +कइ +यहि +इंहिं +जिधर +इंहें +अदि +इतयादि +हुइ +कोनसा +इसकि +दुसरे +जहां +अप +किंहों +उनकि +भि +वरग +हुअ +जेसा +नहिं diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hu.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hu.txt new file mode 100644 index 0000000000..37526da8aa --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hu.txt @@ -0,0 +1,211 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/hungarian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + +| Hungarian stop word list +| prepared by Anna Tordai + +a +ahogy +ahol +aki +akik +akkor +alatt +által +általában +amely +amelyek +amelyekben +amelyeket +amelyet +amelynek +ami +amit +amolyan +amíg +amikor +át +abban +ahhoz +annak +arra +arról +az +azok +azon +azt +azzal +azért +aztán +azután +azonban +bár +be +belül +benne +cikk +cikkek +cikkeket +csak +de +e +eddig +egész +egy +egyes +egyetlen +egyéb +egyik +egyre +ekkor +el +elég +ellen +elő +először +előtt +első +én +éppen +ebben +ehhez +emilyen +ennek +erre +ez +ezt +ezek +ezen +ezzel +ezért +és +fel +felé +hanem +hiszen +hogy +hogyan +igen +így +illetve +ill. +ill +ilyen +ilyenkor +ison +ismét +itt +jó +jól +jobban +kell +kellett +keresztül +keressünk +ki +kívül +között +közül +legalább +lehet +lehetett +legyen +lenne +lenni +lesz +lett +maga +magát +majd +majd +már +más +másik +meg +még +mellett +mert +mely +melyek +mi +mit +míg +miért +milyen +mikor +minden +mindent +mindenki +mindig +mint +mintha +mivel +most +nagy +nagyobb +nagyon +ne +néha +nekem +neki +nem +néhány +nélkül +nincs +olyan +ott +össze +ő +ők +őket +pedig +persze +rá +s +saját +sem +semmi +sok +sokat +sokkal +számára +szemben +szerint +szinte +talán +tehát +teljes +tovább +továbbá +több +úgy +ugyanis +új +újabb +újra +után +utána +utolsó +vagy +vagyis +valaki +valami +valamint +való +vagyok +van +vannak +volt +voltam +voltak +voltunk +vissza +vele +viszont +volna diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hy.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hy.txt new file mode 100644 index 0000000000..60c1c50fbc --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_hy.txt @@ -0,0 +1,46 @@ +# example set of Armenian stopwords. +այդ +այլ +այն +այս +դու +դուք +եմ +են +ենք +ես +եք +է +էի +էին +էինք +էիր +էիք +էր +ըստ +թ +ի +ին +իսկ +իր +կամ +համար +հետ +հետո +մենք +մեջ +մի +ն +նա +նաև +նրա +նրանք +որ +որը +որոնք +որպես +ու +ում +պիտի +վրա +և diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_id.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_id.txt new file mode 100644 index 0000000000..4617f83a5c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_id.txt @@ -0,0 +1,359 @@ +# from appendix D of: A Study of Stemming Effects on Information +# Retrieval in Bahasa Indonesia +ada +adanya +adalah +adapun +agak +agaknya +agar +akan +akankah +akhirnya +aku +akulah +amat +amatlah +anda +andalah +antar +diantaranya +antara +antaranya +diantara +apa +apaan +mengapa +apabila +apakah +apalagi +apatah +atau +ataukah +ataupun +bagai +bagaikan +sebagai +sebagainya +bagaimana +bagaimanapun +sebagaimana +bagaimanakah +bagi +bahkan +bahwa +bahwasanya +sebaliknya +banyak +sebanyak +beberapa +seberapa +begini +beginian +beginikah +beginilah +sebegini +begitu +begitukah +begitulah +begitupun +sebegitu +belum +belumlah +sebelum +sebelumnya +sebenarnya +berapa +berapakah +berapalah +berapapun +betulkah +sebetulnya +biasa +biasanya +bila +bilakah +bisa +bisakah +sebisanya +boleh +bolehkah +bolehlah +buat +bukan +bukankah +bukanlah +bukannya +cuma +percuma +dahulu +dalam +dan +dapat +dari +daripada +dekat +demi +demikian +demikianlah +sedemikian +dengan +depan +di +dia +dialah +dini +diri +dirinya +terdiri +dong +dulu +enggak +enggaknya +entah +entahlah +terhadap +terhadapnya +hal +hampir +hanya +hanyalah +harus +haruslah +harusnya +seharusnya +hendak +hendaklah +hendaknya +hingga +sehingga +ia +ialah +ibarat +ingin +inginkah +inginkan +ini +inikah +inilah +itu +itukah +itulah +jangan +jangankan +janganlah +jika +jikalau +juga +justru +kala +kalau +kalaulah +kalaupun +kalian +kami +kamilah +kamu +kamulah +kan +kapan +kapankah +kapanpun +dikarenakan +karena +karenanya +ke +kecil +kemudian +kenapa +kepada +kepadanya +ketika +seketika +khususnya +kini +kinilah +kiranya +sekiranya +kita +kitalah +kok +lagi +lagian +selagi +lah +lain +lainnya +melainkan +selaku +lalu +melalui +terlalu +lama +lamanya +selama +selama +selamanya +lebih +terlebih +bermacam +macam +semacam +maka +makanya +makin +malah +malahan +mampu +mampukah +mana +manakala +manalagi +masih +masihkah +semasih +masing +mau +maupun +semaunya +memang +mereka +merekalah +meski +meskipun +semula +mungkin +mungkinkah +nah +namun +nanti +nantinya +nyaris +oleh +olehnya +seorang +seseorang +pada +padanya +padahal +paling +sepanjang +pantas +sepantasnya +sepantasnyalah +para +pasti +pastilah +per +pernah +pula +pun +merupakan +rupanya +serupa +saat +saatnya +sesaat +saja +sajalah +saling +bersama +sama +sesama +sambil +sampai +sana +sangat +sangatlah +saya +sayalah +se +sebab +sebabnya +sebuah +tersebut +tersebutlah +sedang +sedangkan +sedikit +sedikitnya +segala +segalanya +segera +sesegera +sejak +sejenak +sekali +sekalian +sekalipun +sesekali +sekaligus +sekarang +sekarang +sekitar +sekitarnya +sela +selain +selalu +seluruh +seluruhnya +semakin +sementara +sempat +semua +semuanya +sendiri +sendirinya +seolah +seperti +sepertinya +sering +seringnya +serta +siapa +siapakah +siapapun +disini +disinilah +sini +sinilah +sesuatu +sesuatunya +suatu +sesudah +sesudahnya +sudah +sudahkah +sudahlah +supaya +tadi +tadinya +tak +tanpa +setelah +telah +tentang +tentu +tentulah +tentunya +tertentu +seterusnya +tapi +tetapi +setiap +tiap +setidaknya +tidak +tidakkah +tidaklah +toh +waduh +wah +wahai +sewaktu +walau +walaupun +wong +yaitu +yakni +yang diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_it.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_it.txt new file mode 100644 index 0000000000..1219cc773a --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_it.txt @@ -0,0 +1,303 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/italian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | An Italian stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + +ad | a (to) before vowel +al | a + il +allo | a + lo +ai | a + i +agli | a + gli +all | a + l' +agl | a + gl' +alla | a + la +alle | a + le +con | with +col | con + il +coi | con + i (forms collo, cogli etc are now very rare) +da | from +dal | da + il +dallo | da + lo +dai | da + i +dagli | da + gli +dall | da + l' +dagl | da + gll' +dalla | da + la +dalle | da + le +di | of +del | di + il +dello | di + lo +dei | di + i +degli | di + gli +dell | di + l' +degl | di + gl' +della | di + la +delle | di + le +in | in +nel | in + el +nello | in + lo +nei | in + i +negli | in + gli +nell | in + l' +negl | in + gl' +nella | in + la +nelle | in + le +su | on +sul | su + il +sullo | su + lo +sui | su + i +sugli | su + gli +sull | su + l' +sugl | su + gl' +sulla | su + la +sulle | su + le +per | through, by +tra | among +contro | against +io | I +tu | thou +lui | he +lei | she +noi | we +voi | you +loro | they +mio | my +mia | +miei | +mie | +tuo | +tua | +tuoi | thy +tue | +suo | +sua | +suoi | his, her +sue | +nostro | our +nostra | +nostri | +nostre | +vostro | your +vostra | +vostri | +vostre | +mi | me +ti | thee +ci | us, there +vi | you, there +lo | him, the +la | her, the +li | them +le | them, the +gli | to him, the +ne | from there etc +il | the +un | a +uno | a +una | a +ma | but +ed | and +se | if +perché | why, because +anche | also +come | how +dov | where (as dov') +dove | where +che | who, that +chi | who +cui | whom +non | not +più | more +quale | who, that +quanto | how much +quanti | +quanta | +quante | +quello | that +quelli | +quella | +quelle | +questo | this +questi | +questa | +queste | +si | yes +tutto | all +tutti | all + + | single letter forms: + +a | at +c | as c' for ce or ci +e | and +i | the +l | as l' +o | or + + | forms of avere, to have (not including the infinitive): + +ho +hai +ha +abbiamo +avete +hanno +abbia +abbiate +abbiano +avrò +avrai +avrà +avremo +avrete +avranno +avrei +avresti +avrebbe +avremmo +avreste +avrebbero +avevo +avevi +aveva +avevamo +avevate +avevano +ebbi +avesti +ebbe +avemmo +aveste +ebbero +avessi +avesse +avessimo +avessero +avendo +avuto +avuta +avuti +avute + + | forms of essere, to be (not including the infinitive): +sono +sei +è +siamo +siete +sia +siate +siano +sarò +sarai +sarà +saremo +sarete +saranno +sarei +saresti +sarebbe +saremmo +sareste +sarebbero +ero +eri +era +eravamo +eravate +erano +fui +fosti +fu +fummo +foste +furono +fossi +fosse +fossimo +fossero +essendo + + | forms of fare, to do (not including the infinitive, fa, fat-): +faccio +fai +facciamo +fanno +faccia +facciate +facciano +farò +farai +farà +faremo +farete +faranno +farei +faresti +farebbe +faremmo +fareste +farebbero +facevo +facevi +faceva +facevamo +facevate +facevano +feci +facesti +fece +facemmo +faceste +fecero +facessi +facesse +facessimo +facessero +facendo + + | forms of stare, to be (not including the infinitive): +sto +stai +sta +stiamo +stanno +stia +stiate +stiano +starò +starai +starà +staremo +starete +staranno +starei +staresti +starebbe +staremmo +stareste +starebbero +stavo +stavi +stava +stavamo +stavate +stavano +stetti +stesti +stette +stemmo +steste +stettero +stessi +stesse +stessimo +stessero +stando diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ja.txt new file mode 100644 index 0000000000..d4321be6b1 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ja.txt @@ -0,0 +1,127 @@ +# +# This file defines a stopword set for Japanese. +# +# This set is made up of hand-picked frequent terms from segmented Japanese Wikipedia. +# Punctuation characters and frequent kanji have mostly been left out. See LUCENE-3745 +# for frequency lists, etc. that can be useful for making your own set (if desired) +# +# Note that there is an overlap between these stopwords and the terms stopped when used +# in combination with the JapanesePartOfSpeechStopFilter. When editing this file, note +# that comments are not allowed on the same line as stopwords. +# +# Also note that stopping is done in a case-insensitive manner. Change your StopFilter +# configuration if you need case-sensitive stopping. Lastly, note that stopping is done +# using the same character width as the entries in this file. Since this StopFilter is +# normally done after a CJKWidthFilter in your chain, you would usually want your romaji +# entries to be in half-width and your kana entries to be in full-width. +# +の +に +は +を +た +が +で +て +と +し +れ +さ +ある +いる +も +する +から +な +こと +として +い +や +れる +など +なっ +ない +この +ため +その +あっ +よう +また +もの +という +あり +まで +られ +なる +へ +か +だ +これ +によって +により +おり +より +による +ず +なり +られる +において +ば +なかっ +なく +しかし +について +せ +だっ +その後 +できる +それ +う +ので +なお +のみ +でき +き +つ +における +および +いう +さらに +でも +ら +たり +その他 +に関する +たち +ます +ん +なら +に対して +特に +せる +及び +これら +とき +では +にて +ほか +ながら +うち +そして +とともに +ただし +かつて +それぞれ +または +お +ほど +ものの +に対する +ほとんど +と共に +といった +です +とも +ところ +ここ +##### End of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_lv.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_lv.txt new file mode 100644 index 0000000000..e21a23c06c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_lv.txt @@ -0,0 +1,172 @@ +# Set of Latvian stopwords from A Stemming Algorithm for Latvian, Karlis Kreslins +# the original list of over 800 forms was refined: +# pronouns, adverbs, interjections were removed +# +# prepositions +aiz +ap +ar +apakš +ārpus +augšpus +bez +caur +dēļ +gar +iekš +iz +kopš +labad +lejpus +līdz +no +otrpus +pa +par +pār +pēc +pie +pirms +pret +priekš +starp +šaipus +uz +viņpus +virs +virspus +zem +apakšpus +# Conjunctions +un +bet +jo +ja +ka +lai +tomēr +tikko +turpretī +arī +kaut +gan +tādēļ +tā +ne +tikvien +vien +kā +ir +te +vai +kamēr +# Particles +ar +diezin +droši +diemžēl +nebūt +ik +it +taču +nu +pat +tiklab +iekšpus +nedz +tik +nevis +turpretim +jeb +iekam +iekām +iekāms +kolīdz +līdzko +tiklīdz +jebšu +tālab +tāpēc +nekā +itin +jā +jau +jel +nē +nezin +tad +tikai +vis +tak +iekams +vien +# modal verbs +būt +biju +biji +bija +bijām +bijāt +esmu +esi +esam +esat +būšu +būsi +būs +būsim +būsiet +tikt +tiku +tiki +tika +tikām +tikāt +tieku +tiec +tiek +tiekam +tiekat +tikšu +tiks +tiksim +tiksiet +tapt +tapi +tapāt +topat +tapšu +tapsi +taps +tapsim +tapsiet +kļūt +kļuvu +kļuvi +kļuva +kļuvām +kļuvāt +kļūstu +kļūsti +kļūst +kļūstam +kļūstat +kļūšu +kļūsi +kļūs +kļūsim +kļūsiet +# verbs +varēt +varēju +varējām +varēšu +varēsim +var +varēji +varējāt +varēsi +varēsiet +varat +varēja +varēs diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_nl.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_nl.txt new file mode 100644 index 0000000000..47a2aeacf6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_nl.txt @@ -0,0 +1,119 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/dutch/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Dutch stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large sample of Dutch text. + + | Dutch stop words frequently exhibit homonym clashes. These are indicated + | clearly below. + +de | the +en | and +van | of, from +ik | I, the ego +te | (1) chez, at etc, (2) to, (3) too +dat | that, which +die | that, those, who, which +in | in, inside +een | a, an, one +hij | he +het | the, it +niet | not, nothing, naught +zijn | (1) to be, being, (2) his, one's, its +is | is +was | (1) was, past tense of all persons sing. of 'zijn' (to be) (2) wax, (3) the washing, (4) rise of river +op | on, upon, at, in, up, used up +aan | on, upon, to (as dative) +met | with, by +als | like, such as, when +voor | (1) before, in front of, (2) furrow +had | had, past tense all persons sing. of 'hebben' (have) +er | there +maar | but, only +om | round, about, for etc +hem | him +dan | then +zou | should/would, past tense all persons sing. of 'zullen' +of | or, whether, if +wat | what, something, anything +mijn | possessive and noun 'mine' +men | people, 'one' +dit | this +zo | so, thus, in this way +door | through by +over | over, across +ze | she, her, they, them +zich | oneself +bij | (1) a bee, (2) by, near, at +ook | also, too +tot | till, until +je | you +mij | me +uit | out of, from +der | Old Dutch form of 'van der' still found in surnames +daar | (1) there, (2) because +haar | (1) her, their, them, (2) hair +naar | (1) unpleasant, unwell etc, (2) towards, (3) as +heb | present first person sing. of 'to have' +hoe | how, why +heeft | present third person sing. of 'to have' +hebben | 'to have' and various parts thereof +deze | this +u | you +want | (1) for, (2) mitten, (3) rigging +nog | yet, still +zal | 'shall', first and third person sing. of verb 'zullen' (will) +me | me +zij | she, they +nu | now +ge | 'thou', still used in Belgium and south Netherlands +geen | none +omdat | because +iets | something, somewhat +worden | to become, grow, get +toch | yet, still +al | all, every, each +waren | (1) 'were' (2) to wander, (3) wares, (3) +veel | much, many +meer | (1) more, (2) lake +doen | to do, to make +toen | then, when +moet | noun 'spot/mote' and present form of 'to must' +ben | (1) am, (2) 'are' in interrogative second person singular of 'to be' +zonder | without +kan | noun 'can' and present form of 'to be able' +hun | their, them +dus | so, consequently +alles | all, everything, anything +onder | under, beneath +ja | yes, of course +eens | once, one day +hier | here +wie | who +werd | imperfect third person sing. of 'become' +altijd | always +doch | yet, but etc +wordt | present third person sing. of 'become' +wezen | (1) to be, (2) 'been' as in 'been fishing', (3) orphans +kunnen | to be able +ons | us/our +zelf | self +tegen | against, towards, at +na | after, near +reeds | already +wil | (1) present tense of 'want', (2) 'will', noun, (3) fender +kon | could; past tense of 'to be able' +niets | nothing +uw | your +iemand | somebody +geweest | been; past participle of 'be' +andere | other diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_no.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_no.txt new file mode 100644 index 0000000000..a7a2c28ba5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_no.txt @@ -0,0 +1,194 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/norwegian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Norwegian stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This stop word list is for the dominant bokmål dialect. Words unique + | to nynorsk are marked *. + + | Revised by Jan Bruusgaard , Jan 2005 + +og | and +i | in +jeg | I +det | it/this/that +at | to (w. inf.) +en | a/an +et | a/an +den | it/this/that +til | to +er | is/am/are +som | who/that +på | on +de | they / you(formal) +med | with +han | he +av | of +ikke | not +ikkje | not * +der | there +så | so +var | was/were +meg | me +seg | you +men | but +ett | one +har | have +om | about +vi | we +min | my +mitt | my +ha | have +hadde | had +hun | she +nå | now +over | over +da | when/as +ved | by/know +fra | from +du | you +ut | out +sin | your +dem | them +oss | us +opp | up +man | you/one +kan | can +hans | his +hvor | where +eller | or +hva | what +skal | shall/must +selv | self (reflective) +sjøl | self (reflective) +her | here +alle | all +vil | will +bli | become +ble | became +blei | became * +blitt | have become +kunne | could +inn | in +når | when +være | be +kom | come +noen | some +noe | some +ville | would +dere | you +som | who/which/that +deres | their/theirs +kun | only/just +ja | yes +etter | after +ned | down +skulle | should +denne | this +for | for/because +deg | you +si | hers/his +sine | hers/his +sitt | hers/his +mot | against +å | to +meget | much +hvorfor | why +dette | this +disse | these/those +uten | without +hvordan | how +ingen | none +din | your +ditt | your +blir | become +samme | same +hvilken | which +hvilke | which (plural) +sånn | such a +inni | inside/within +mellom | between +vår | our +hver | each +hvem | who +vors | us/ours +hvis | whose +både | both +bare | only/just +enn | than +fordi | as/because +før | before +mange | many +også | also +slik | just +vært | been +være | to be +båe | both * +begge | both +siden | since +dykk | your * +dykkar | yours * +dei | they * +deira | them * +deires | theirs * +deim | them * +di | your (fem.) * +då | as/when * +eg | I * +ein | a/an * +eit | a/an * +eitt | a/an * +elles | or * +honom | he * +hjå | at * +ho | she * +hoe | she * +henne | her +hennar | her/hers +hennes | hers +hoss | how * +hossen | how * +ikkje | not * +ingi | noone * +inkje | noone * +korleis | how * +korso | how * +kva | what/which * +kvar | where * +kvarhelst | where * +kven | who/whom * +kvi | why * +kvifor | why * +me | we * +medan | while * +mi | my * +mine | my * +mykje | much * +no | now * +nokon | some (masc./neut.) * +noka | some (fem.) * +nokor | some * +noko | some * +nokre | some * +si | his/hers * +sia | since * +sidan | since * +so | so * +somt | some * +somme | some * +um | about* +upp | up * +vere | be * +vore | was * +verte | become * +vort | become * +varte | became * +vart | became * + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_pt.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_pt.txt new file mode 100644 index 0000000000..acfeb01af6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_pt.txt @@ -0,0 +1,253 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/portuguese/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Portuguese stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + + | The following is a ranked list (commonest to rarest) of stopwords + | deriving from a large sample of text. + + | Extra words have been added at the end. + +de | of, from +a | the; to, at; her +o | the; him +que | who, that +e | and +do | de + o +da | de + a +em | in +um | a +para | for + | é from SER +com | with +não | not, no +uma | a +os | the; them +no | em + o +se | himself etc +na | em + a +por | for +mais | more +as | the; them +dos | de + os +como | as, like +mas | but + | foi from SER +ao | a + o +ele | he +das | de + as + | tem from TER +à | a + a +seu | his +sua | her +ou | or + | ser from SER +quando | when +muito | much + | há from HAV +nos | em + os; us +já | already, now + | está from EST +eu | I +também | also +só | only, just +pelo | per + o +pela | per + a +até | up to +isso | that +ela | he +entre | between + | era from SER +depois | after +sem | without +mesmo | same +aos | a + os + | ter from TER +seus | his +quem | whom +nas | em + as +me | me +esse | that +eles | they + | estão from EST +você | you + | tinha from TER + | foram from SER +essa | that +num | em + um +nem | nor +suas | her +meu | my +às | a + as +minha | my + | têm from TER +numa | em + uma +pelos | per + os +elas | they + | havia from HAV + | seja from SER +qual | which + | será from SER +nós | we + | tenho from TER +lhe | to him, her +deles | of them +essas | those +esses | those +pelas | per + as +este | this + | fosse from SER +dele | of him + + | other words. There are many contractions such as naquele = em+aquele, + | mo = me+o, but they are rare. + | Indefinite article plural forms are also rare. + +tu | thou +te | thee +vocês | you (plural) +vos | you +lhes | to them +meus | my +minhas +teu | thy +tua +teus +tuas +nosso | our +nossa +nossos +nossas + +dela | of her +delas | of them + +esta | this +estes | these +estas | these +aquele | that +aquela | that +aqueles | those +aquelas | those +isto | this +aquilo | that + + | forms of estar, to be (not including the infinitive): +estou +está +estamos +estão +estive +esteve +estivemos +estiveram +estava +estávamos +estavam +estivera +estivéramos +esteja +estejamos +estejam +estivesse +estivéssemos +estivessem +estiver +estivermos +estiverem + + | forms of haver, to have (not including the infinitive): +hei +há +havemos +hão +houve +houvemos +houveram +houvera +houvéramos +haja +hajamos +hajam +houvesse +houvéssemos +houvessem +houver +houvermos +houverem +houverei +houverá +houveremos +houverão +houveria +houveríamos +houveriam + + | forms of ser, to be (not including the infinitive): +sou +somos +são +era +éramos +eram +fui +foi +fomos +foram +fora +fôramos +seja +sejamos +sejam +fosse +fôssemos +fossem +for +formos +forem +serei +será +seremos +serão +seria +seríamos +seriam + + | forms of ter, to have (not including the infinitive): +tenho +tem +temos +tém +tinha +tínhamos +tinham +tive +teve +tivemos +tiveram +tivera +tivéramos +tenha +tenhamos +tenham +tivesse +tivéssemos +tivessem +tiver +tivermos +tiverem +terei +terá +teremos +terão +teria +teríamos +teriam diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ro.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ro.txt new file mode 100644 index 0000000000..4fdee90a5b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ro.txt @@ -0,0 +1,233 @@ +# This file was created by Jacques Savoy and is distributed under the BSD license. +# See http://members.unine.ch/jacques.savoy/clef/index.html. +# Also see http://www.opensource.org/licenses/bsd-license.html +acea +aceasta +această +aceea +acei +aceia +acel +acela +acele +acelea +acest +acesta +aceste +acestea +aceşti +aceştia +acolo +acum +ai +aia +aibă +aici +al +ăla +ale +alea +ălea +altceva +altcineva +am +ar +are +aş +aşadar +asemenea +asta +ăsta +astăzi +astea +ăstea +ăştia +asupra +aţi +au +avea +avem +aveţi +azi +bine +bucur +bună +ca +că +căci +când +care +cărei +căror +cărui +cât +câte +câţi +către +câtva +ce +cel +ceva +chiar +cînd +cine +cineva +cît +cîte +cîţi +cîtva +contra +cu +cum +cumva +curând +curînd +da +dă +dacă +dar +datorită +de +deci +deja +deoarece +departe +deşi +din +dinaintea +dintr +dintre +drept +după +ea +ei +el +ele +eram +este +eşti +eu +face +fără +fi +fie +fiecare +fii +fim +fiţi +iar +ieri +îi +îl +îmi +împotriva +în +înainte +înaintea +încât +încît +încotro +între +întrucât +întrucît +îţi +la +lângă +le +li +lîngă +lor +lui +mă +mâine +mea +mei +mele +mereu +meu +mi +mine +mult +multă +mulţi +ne +nicăieri +nici +nimeni +nişte +noastră +noastre +noi +noştri +nostru +nu +ori +oricând +oricare +oricât +orice +oricînd +oricine +oricît +oricum +oriunde +până +pe +pentru +peste +pînă +poate +pot +prea +prima +primul +prin +printr +sa +să +săi +sale +sau +său +se +şi +sînt +sîntem +sînteţi +spre +sub +sunt +suntem +sunteţi +ta +tăi +tale +tău +te +ţi +ţie +tine +toată +toate +tot +toţi +totuşi +tu +un +una +unde +undeva +unei +unele +uneori +unor +vă +vi +voastră +voastre +voi +voştri +vostru +vouă +vreo +vreun diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ru.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ru.txt new file mode 100644 index 0000000000..55271400c6 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_ru.txt @@ -0,0 +1,243 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/russian/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | a russian stop word list. comments begin with vertical bar. each stop + | word is at the start of a line. + + | this is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + | letter `ё' is translated to `е'. + +и | and +в | in/into +во | alternative form +не | not +что | what/that +он | he +на | on/onto +я | i +с | from +со | alternative form +как | how +а | milder form of `no' (but) +то | conjunction and form of `that' +все | all +она | she +так | so, thus +его | him +но | but +да | yes/and +ты | thou +к | towards, by +у | around, chez +же | intensifier particle +вы | you +за | beyond, behind +бы | conditional/subj. particle +по | up to, along +только | only +ее | her +мне | to me +было | it was +вот | here is/are, particle +от | away from +меня | me +еще | still, yet, more +нет | no, there isnt/arent +о | about +из | out of +ему | to him +теперь | now +когда | when +даже | even +ну | so, well +вдруг | suddenly +ли | interrogative particle +если | if +уже | already, but homonym of `narrower' +или | or +ни | neither +быть | to be +был | he was +него | prepositional form of его +до | up to +вас | you accusative +нибудь | indef. suffix preceded by hyphen +опять | again +уж | already, but homonym of `adder' +вам | to you +сказал | he said +ведь | particle `after all' +там | there +потом | then +себя | oneself +ничего | nothing +ей | to her +может | usually with `быть' as `maybe' +они | they +тут | here +где | where +есть | there is/are +надо | got to, must +ней | prepositional form of ей +для | for +мы | we +тебя | thee +их | them, their +чем | than +была | she was +сам | self +чтоб | in order to +без | without +будто | as if +человек | man, person, one +чего | genitive form of `what' +раз | once +тоже | also +себе | to oneself +под | beneath +жизнь | life +будет | will be +ж | short form of intensifer particle `же' +тогда | then +кто | who +этот | this +говорил | was saying +того | genitive form of `that' +потому | for that reason +этого | genitive form of `this' +какой | which +совсем | altogether +ним | prepositional form of `его', `они' +здесь | here +этом | prepositional form of `этот' +один | one +почти | almost +мой | my +тем | instrumental/dative plural of `тот', `то' +чтобы | full form of `in order that' +нее | her (acc.) +кажется | it seems +сейчас | now +были | they were +куда | where to +зачем | why +сказать | to say +всех | all (acc., gen. preposn. plural) +никогда | never +сегодня | today +можно | possible, one can +при | by +наконец | finally +два | two +об | alternative form of `о', about +другой | another +хоть | even +после | after +над | above +больше | more +тот | that one (masc.) +через | across, in +эти | these +нас | us +про | about +всего | in all, only, of all +них | prepositional form of `они' (they) +какая | which, feminine +много | lots +разве | interrogative particle +сказала | she said +три | three +эту | this, acc. fem. sing. +моя | my, feminine +впрочем | moreover, besides +хорошо | good +свою | ones own, acc. fem. sing. +этой | oblique form of `эта', fem. `this' +перед | in front of +иногда | sometimes +лучше | better +чуть | a little +том | preposn. form of `that one' +нельзя | one must not +такой | such a one +им | to them +более | more +всегда | always +конечно | of course +всю | acc. fem. sing of `all' +между | between + + + | b: some paradigms + | + | personal pronouns + | + | я меня мне мной [мною] + | ты тебя тебе тобой [тобою] + | он его ему им [него, нему, ним] + | она ее эи ею [нее, нэи, нею] + | оно его ему им [него, нему, ним] + | + | мы нас нам нами + | вы вас вам вами + | они их им ими [них, ним, ними] + | + | себя себе собой [собою] + | + | demonstrative pronouns: этот (this), тот (that) + | + | этот эта это эти + | этого эты это эти + | этого этой этого этих + | этому этой этому этим + | этим этой этим [этою] этими + | этом этой этом этих + | + | тот та то те + | того ту то те + | того той того тех + | тому той тому тем + | тем той тем [тою] теми + | том той том тех + | + | determinative pronouns + | + | (a) весь (all) + | + | весь вся все все + | всего всю все все + | всего всей всего всех + | всему всей всему всем + | всем всей всем [всею] всеми + | всем всей всем всех + | + | (b) сам (himself etc) + | + | сам сама само сами + | самого саму само самих + | самого самой самого самих + | самому самой самому самим + | самим самой самим [самою] самими + | самом самой самом самих + | + | stems of verbs `to be', `to have', `to do' and modal + | + | быть бы буд быв есть суть + | име + | дел + | мог мож мочь + | уме + | хоч хот + | долж + | можн + | нужн + | нельзя + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_sv.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_sv.txt new file mode 100644 index 0000000000..096f87f676 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_sv.txt @@ -0,0 +1,133 @@ + | From svn.tartarus.org/snowball/trunk/website/algorithms/swedish/stop.txt + | This file is distributed under the BSD License. + | See http://snowball.tartarus.org/license.php + | Also see http://www.opensource.org/licenses/bsd-license.html + | - Encoding was converted to UTF-8. + | - This notice was added. + | + | NOTE: To use this file with StopFilterFactory, you must specify format="snowball" + + | A Swedish stop word list. Comments begin with vertical bar. Each stop + | word is at the start of a line. + + | This is a ranked list (commonest to rarest) of stopwords derived from + | a large text sample. + + | Swedish stop words occasionally exhibit homonym clashes. For example + | så = so, but also seed. These are indicated clearly below. + +och | and +det | it, this/that +att | to (with infinitive) +i | in, at +en | a +jag | I +hon | she +som | who, that +han | he +på | on +den | it, this/that +med | with +var | where, each +sig | him(self) etc +för | for +så | so (also: seed) +till | to +är | is +men | but +ett | a +om | if; around, about +hade | had +de | they, these/those +av | of +icke | not, no +mig | me +du | you +henne | her +då | then, when +sin | his +nu | now +har | have +inte | inte någon = no one +hans | his +honom | him +skulle | 'sake' +hennes | her +där | there +min | my +man | one (pronoun) +ej | nor +vid | at, by, on (also: vast) +kunde | could +något | some etc +från | from, off +ut | out +när | when +efter | after, behind +upp | up +vi | we +dem | them +vara | be +vad | what +över | over +än | than +dig | you +kan | can +sina | his +här | here +ha | have +mot | towards +alla | all +under | under (also: wonder) +någon | some etc +eller | or (else) +allt | all +mycket | much +sedan | since +ju | why +denna | this/that +själv | myself, yourself etc +detta | this/that +åt | to +utan | without +varit | was +hur | how +ingen | no +mitt | my +ni | you +bli | to be, become +blev | from bli +oss | us +din | thy +dessa | these/those +några | some etc +deras | their +blir | from bli +mina | my +samma | (the) same +vilken | who, that +er | you, your +sådan | such a +vår | our +blivit | from bli +dess | its +inom | within +mellan | between +sådant | such a +varför | why +varje | each +vilka | who, that +ditt | thy +vem | who +vilket | who, that +sitta | his +sådana | such a +vart | each +dina | thy +vars | whose +vårt | our +våra | our +ert | your +era | your +vilkas | whose + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_th.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_th.txt new file mode 100644 index 0000000000..07f0fabe69 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_th.txt @@ -0,0 +1,119 @@ +# Thai stopwords from: +# "Opinion Detection in Thai Political News Columns +# Based on Subjectivity Analysis" +# Khampol Sukhum, Supot Nitsuwat, and Choochart Haruechaiyasak +ไว้ +ไม่ +ไป +ได้ +ให้ +ใน +โดย +แห่ง +แล้ว +และ +แรก +แบบ +แต่ +เอง +เห็น +เลย +เริ่ม +เรา +เมื่อ +เพื่อ +เพราะ +เป็นการ +เป็น +เปิดเผย +เปิด +เนื่องจาก +เดียวกัน +เดียว +เช่น +เฉพาะ +เคย +เข้า +เขา +อีก +อาจ +อะไร +ออก +อย่าง +อยู่ +อยาก +หาก +หลาย +หลังจาก +หลัง +หรือ +หนึ่ง +ส่วน +ส่ง +สุด +สําหรับ +ว่า +วัน +ลง +ร่วม +ราย +รับ +ระหว่าง +รวม +ยัง +มี +มาก +มา +พร้อม +พบ +ผ่าน +ผล +บาง +น่า +นี้ +นํา +นั้น +นัก +นอกจาก +ทุก +ที่สุด +ที่ +ทําให้ +ทํา +ทาง +ทั้งนี้ +ทั้ง +ถ้า +ถูก +ถึง +ต้อง +ต่างๆ +ต่าง +ต่อ +ตาม +ตั้งแต่ +ตั้ง +ด้าน +ด้วย +ดัง +ซึ่ง +ช่วง +จึง +จาก +จัด +จะ +คือ +ความ +ครั้ง +คง +ขึ้น +ของ +ขอ +ขณะ +ก่อน +ก็ +การ +กับ +กัน +กว่า +กล่าว diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_tr.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_tr.txt new file mode 100644 index 0000000000..84d9408d4e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/stopwords_tr.txt @@ -0,0 +1,212 @@ +# Turkish stopwords from LUCENE-559 +# merged with the list from "Information Retrieval on Turkish Texts" +# (http://www.users.muohio.edu/canf/papers/JASIST2008offPrint.pdf) +acaba +altmış +altı +ama +ancak +arada +aslında +ayrıca +bana +bazı +belki +ben +benden +beni +benim +beri +beş +bile +bin +bir +birçok +biri +birkaç +birkez +birşey +birşeyi +biz +bize +bizden +bizi +bizim +böyle +böylece +bu +buna +bunda +bundan +bunlar +bunları +bunların +bunu +bunun +burada +çok +çünkü +da +daha +dahi +de +defa +değil +diğer +diye +doksan +dokuz +dolayı +dolayısıyla +dört +edecek +eden +ederek +edilecek +ediliyor +edilmesi +ediyor +eğer +elli +en +etmesi +etti +ettiği +ettiğini +gibi +göre +halen +hangi +hatta +hem +henüz +hep +hepsi +her +herhangi +herkesin +hiç +hiçbir +için +iki +ile +ilgili +ise +işte +itibaren +itibariyle +kadar +karşın +katrilyon +kendi +kendilerine +kendini +kendisi +kendisine +kendisini +kez +ki +kim +kimden +kime +kimi +kimse +kırk +milyar +milyon +mu +mü +mı +nasıl +ne +neden +nedenle +nerde +nerede +nereye +niye +niçin +o +olan +olarak +oldu +olduğu +olduğunu +olduklarını +olmadı +olmadığı +olmak +olması +olmayan +olmaz +olsa +olsun +olup +olur +olursa +oluyor +on +ona +ondan +onlar +onlardan +onları +onların +onu +onun +otuz +oysa +öyle +pek +rağmen +sadece +sanki +sekiz +seksen +sen +senden +seni +senin +siz +sizden +sizi +sizin +şey +şeyden +şeyi +şeyler +şöyle +şu +şuna +şunda +şundan +şunları +şunu +tarafından +trilyon +tüm +üç +üzere +var +vardı +ve +veya +ya +yani +yapacak +yapılan +yapılması +yapıyor +yapmak +yaptı +yaptığı +yaptığını +yaptıkları +yedi +yerine +yetmiş +yine +yirmi +yoksa +yüz +zaten diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/userdict_ja.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/userdict_ja.txt new file mode 100644 index 0000000000..6f0368e4d8 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/lang/userdict_ja.txt @@ -0,0 +1,29 @@ +# +# This is a sample user dictionary for Kuromoji (JapaneseTokenizer) +# +# Add entries to this file in order to override the statistical model in terms +# of segmentation, readings and part-of-speech tags. Notice that entries do +# not have weights since they are always used when found. This is by-design +# in order to maximize ease-of-use. +# +# Entries are defined using the following CSV format: +# , ... , ... , +# +# Notice that a single half-width space separates tokens and readings, and +# that the number tokens and readings must match exactly. +# +# Also notice that multiple entries with the same is undefined. +# +# Whitespace only lines are ignored. Comments are not allowed on entry lines. +# + +# Custom segmentation for kanji compounds +日本経済新聞,日本 経済 新聞,ニホン ケイザイ シンブン,カスタム名詞 +関西国際空港,関西 国際 空港,カンサイ コクサイ クウコウ,カスタム名詞 + +# Custom segmentation for compound katakana +トートバッグ,トート バッグ,トート バッグ,かずカナ名詞 +ショルダーバッグ,ショルダー バッグ,ショルダー バッグ,かずカナ名詞 + +# Custom reading for former sumo wrestler +朝青龍,朝青龍,アサショウリュウ,カスタム人名 diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/managed-schema b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/managed-schema new file mode 100644 index 0000000000..87b84df498 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/managed-schema @@ -0,0 +1,1149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/solr/conf/mapping-FoldToASCII.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/mapping-FoldToASCII.txt similarity index 100% rename from KeywordSearch/release/solr/solr/conf/mapping-FoldToASCII.txt rename to KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/mapping-FoldToASCII.txt diff --git a/KeywordSearch/release/solr/solr/conf/mapping-ISOLatin1Accent.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/mapping-ISOLatin1Accent.txt similarity index 100% rename from KeywordSearch/release/solr/solr/conf/mapping-ISOLatin1Accent.txt rename to KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/mapping-ISOLatin1Accent.txt diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/protwords.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/protwords.txt new file mode 100644 index 0000000000..1dfc0abecb --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/protwords.txt @@ -0,0 +1,21 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +# Use a protected word file to protect against the stemmer reducing two +# unrelated words to the same base word. + +# Some non-words that normally won't be encountered, +# just to test that they won't be stemmed. +dontstems +zwhacky + diff --git a/KeywordSearch/release/solr/solr/conf/solrconfig.xml b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml similarity index 80% rename from KeywordSearch/release/solr/solr/conf/solrconfig.xml rename to KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml index 052ddce699..14547ec050 100644 --- a/KeywordSearch/release/solr/solr/conf/solrconfig.xml +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml @@ -35,9 +35,9 @@ that you fully re-index after changing this setting as it can affect both how text is indexed and queried. --> - LUCENE_40 + 6.2.1 - - - + + - - + + - - + + - - - - - + + - - - + class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/> + + + - - 1000 + - false + - 32 - 200 - - + Lucene will flush based on whichever limit is hit first. + The default is 100 MB. --> + + - - - - 10 - native - - - false - - - - - - true + ${solr.lock.type:native} - + - 1 + - 0 + + - false + true @@ -301,6 +273,24 @@ + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + - 15000 - true + ${solr.autoCommit.maxTime:15000} + false - + + + ${solr.autoSoftCommit.maxTime:-1} + - - - - - 1024 + + + -1 + + + Caches results of searches - ordered lists of document ids + (DocList) based on a query, a sort, and the range of documents requested. + Additional supported parameter by LRUCache: + maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed + to occupy + --> + + + - 5 + 20 - 16 + 200 - + + multipartUploadLimitInKB="2048000" + formdataUploadLimitInKB="2048" + addHttpRequestToContext="false"/> - + explicit 10 - text + + false - - - true - json - true - - - - - - - + on - text content file_name + content features title name + true html - 0 - file_name - <b> </b> 0 title - + 0 + name 3 200 content 750 - - @@ -940,53 +946,36 @@ - + _src_ + + true + - Note: Since solr1.1 requestHandlers requires a valid content - type header if posted in the body. For example, curl now - requires: -H 'Content-type:text/xml; charset=utf-8' - - To override the request content type and force a specific - Content-type, use the request parameter: - ?update.contentType=text/csv - - This handler will pick a response format to match the input - if the 'wt' parameter is not explicit - --> - - - - - - - + - - + - - - - - - - - - - - search - solrpingquery - - - all - - - - - @@ -1125,41 +1062,6 @@ - - - - - - - - textSpell + text_general default - name + text solr.DirectSolrSpellChecker internal @@ -1238,7 +1140,7 @@ 0.01 @@ -1290,7 +1192,7 @@ --> - + - text + + + mySuggester + FuzzyLookupFactory + DocumentDictionaryFactory + cat + price + string + false + + + + + + true + 10 + + + suggest + + + + - text true @@ -1353,76 +1286,56 @@ - + + - - default - - - org.carrot2.clustering.lingo.LingoClusteringAlgorithm - - - 20 - - - clustering/carrot2 - - - ENGLISH + lingo3g + true + com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm + clustering/carrot2 + + + lingo + org.carrot2.clustering.lingo.LingoClusteringAlgorithm + clustering/carrot2 + + stc org.carrot2.clustering.stc.STCClusteringAlgorithm + clustering/carrot2 + + + + kmeans + org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm + clustering/carrot2 - @@ -1432,33 +1345,34 @@ class="solr.SearchHandler"> true - default true - + name + id - - features - - true - - - - false - - edismax - - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 - - *:* - 10 - *,score - + + features + + true + + + + false + + + edismax + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + *:* + 100 + *,score + clustering - + @@ -1709,6 +1620,7 @@ + --> @@ -1722,7 +1634,9 @@ - + + ${velocity.template.base.dir:} + - - - - *:* - - diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/spellings.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/spellings.txt new file mode 100644 index 0000000000..d7ede6f561 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/spellings.txt @@ -0,0 +1,2 @@ +pizza +history \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/stopwords.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/stopwords.txt new file mode 100644 index 0000000000..ae1e83eeb3 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/stopwords.txt @@ -0,0 +1,14 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/synonyms.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/synonyms.txt new file mode 100644 index 0000000000..7f72128303 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/synonyms.txt @@ -0,0 +1,29 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +#some test synonym mappings unlikely to appear in real input text +aaafoo => aaabar +bbbfoo => bbbfoo bbbbar +cccfoo => cccbar cccbaz +fooaaa,baraaa,bazaaa + +# Some synonym groups specific to this example +GB,gib,gigabyte,gigabytes +MB,mib,megabyte,megabytes +Television, Televisions, TV, TVs +#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming +#after us won't split it into two words. + +# Synonym mappings can be used for spelling correction too +pixima => pixma + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/update-script.js b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/update-script.js new file mode 100644 index 0000000000..49b07f9b71 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/update-script.js @@ -0,0 +1,53 @@ +/* + This is a basic skeleton JavaScript update processor. + + In order for this to be executed, it must be properly wired into solrconfig.xml; by default it is commented out in + the example solrconfig.xml and must be uncommented to be enabled. + + See http://wiki.apache.org/solr/ScriptUpdateProcessor for more details. +*/ + +function processAdd(cmd) { + + doc = cmd.solrDoc; // org.apache.solr.common.SolrInputDocument + id = doc.getFieldValue("id"); + logger.info("update-script#processAdd: id=" + id); + +// Set a field value: +// doc.setField("foo_s", "whatever"); + +// Get a configuration parameter: +// config_param = params.get('config_param'); // "params" only exists if processor configured with + +// Get a request parameter: +// some_param = req.getParams().get("some_param") + +// Add a field of field names that match a pattern: +// - Potentially useful to determine the fields/attributes represented in a result set, via faceting on field_name_ss +// field_names = doc.getFieldNames().toArray(); +// for(i=0; i < field_names.length; i++) { +// field_name = field_names[i]; +// if (/attr_.*/.test(field_name)) { doc.addField("attribute_ss", field_names[i]); } +// } + +} + +function processDelete(cmd) { + // no-op +} + +function processMergeIndexes(cmd) { + // no-op +} + +function processCommit(cmd) { + // no-op +} + +function processRollback(cmd) { + // no-op +} + +function finish() { + // no-op +} diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/README.txt b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/README.txt new file mode 100644 index 0000000000..5d560baec2 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/README.txt @@ -0,0 +1,101 @@ +Introduction +------------ +Solr Search Velocity Templates + +A quick demo of using Solr using http://wiki.apache.org/solr/VelocityResponseWriter + +You typically access these templates via: + http://localhost:8983/solr/collection1/browse + +It's called "browse" because you can click around with your mouse +without needing to type any search terms. And of course it +also works as a standard search app as well. + +Known Limitations +----------------- +* The /browse and the VelocityResponseWriter component + serve content directly from Solr, which usually requires + Solr's HTTP API to be exposed. Advanced users could + potentially access other parts of Solr directly. +* There are some hard coded fields in these templates. + Since these templates live under conf, they should be + considered part of the overall configuration, and + must be coordinated with schema.xml and solrconfig.xml + +Velocity Info +------------- +Java-based template language. + +It's nice in this context because change to the templates +are immediately visible in browser on the next visit. + +Links: + http://velocity.apache.org + http://wiki.apache.org/velocity/ + http://velocity.apache.org/engine/releases/velocity-1.7/user-guide.html + + +File List +--------- + +System and Misc: + VM_global_library.vm - Macros used other templates, + exact filename is important for Velocity to see it + error.vm - shows errors, if any + debug.vm - includes toggle links for "explain" and "all fields" + activated by debug link in footer.vm + README.txt - this file + +Overall Page Composition: + browse.vm - Main entry point into templates + layout.vm - overall HTML page layout + head.vm - elements in the section of the HTML document + header.vm - top section of page visible to users + footer.vm - bottom section of page visible to users, + includes debug and help links + main.css - CSS style for overall pages + see also jquery.autocomplete.css + +Query Form and Options: + query_form.vm - renders query form + query_group.vm - group by fields + e.g.: Manufacturer or Poplularity + query_spatial.vm - select box for location based Geospacial search + +Spelling Suggestions: + did_you_mean.vm - hyperlinked spelling suggestions in results + suggest.vm - dynamic spelling suggestions + as you type in the search form + jquery.autocomplete.js - supporting files for dynamic suggestions + jquery.autocomplete.css - Most CSS is defined in main.css + + +Search Results, General: + (see also browse.vm) + tabs.vm - provides navigation to advanced search options + pagination_top.vm - paging and staticis at top of results + pagination_bottom.vm - paging and staticis at bottom of results + results_list.vm + hit.vm - called for each matching doc, + decides which template to use + hit_grouped.vm - display results grouped by field values + product_doc.vm - display a Product + join_doc.vm - display a joined document + richtext_doc.vm - display a complex/misc. document + hit_plain.vm - basic display of all fields, + edit results_list.vm to enable this + + +Search Results, Facets & Clusters: + facets.vm - calls the 4 facet and 1 cluster template + facet_fields.vm - display facets based on field values + e.g.: fields specified by &facet.field= + facet_queries.vm - display facets based on specific facet queries + e.g.: facets specified by &facet.query= + facet_ranges.vm - display facets based on ranges + e.g.: ranges specified by &facet.range= + facet_pivot.vm - display pivot based facets + e.g.: facets specified by &facet.pivot= + cluster.vm - if clustering is available + then call cluster_results.vm + cluster_results.vm - actual rendering of clusters diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/VM_global_library.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/VM_global_library.vm new file mode 100644 index 0000000000..76516b7935 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/VM_global_library.vm @@ -0,0 +1,182 @@ +#** + * Global macros used by other templates. + * This file must be named VM_global_library.vm + * in order for Velocity to find it. + *# + +#macro(param $key)$request.params.get($key)#end + +#macro(url_root)/solr#end + +## TODO: s/url_for_solr/url_for_core/ and s/url_root/url_for_solr/ +#macro(core_name)$request.core.name#end +#macro(url_for_solr)#{url_root}#if($request.core.name != "")/$request.core.name#end#end +#macro(url_for_home)#url_for_solr/browse#end + +#macro(q)&q=$!{esc.url($params.get('q'))}#end + +#macro(fqs $p)#foreach($fq in $p)#if($velocityCount>1)&#{end}fq=$esc.url($fq)#end#end + +#macro(debug)#if($request.params.get('debugQuery'))&debugQuery=true#end#end + +#macro(boostPrice)#if($request.params.get('bf') == 'price')&bf=price#end#end + +#macro(annotate)#if($request.params.get('annotateBrowse'))&annotateBrowse=true#end#end + +#macro(annTitle $msg)#if($annotate == true)title="$msg"#end#end + +#macro(spatial)#if($request.params.get('sfield'))&sfield=store#end#if($request.params.get('pt'))&pt=$request.params.get('pt')#end#if($request.params.get('d'))&d=$request.params.get('d')#end#end + +#macro(qOpts)#set($queryOpts = $request.params.get("queryOpts"))#if($queryOpts && $queryOpts != "")&queryOpts=$queryOpts#end#end + +#macro(group)#if($request.params.getBool("group") == true)&group=true#end#if($request.params.get("group.field"))#foreach($grp in $request.params.getParams('group.field'))&group.field=$grp#end#end#end + +#macro(sort $p)#if($p)#foreach($s in $p)&sort=$esc.url($s)#end#end#end + +#macro(lensNoQ)?#if($request.params.getParams('fq') and $list.size($request.params.getParams('fq')) > 0)&#fqs($request.params.getParams('fq'))#end#sort($request.params.getParams('sort'))#debug#boostPrice#annotate#spatial#qOpts#group#end +#macro(lens)#lensNoQ#q#end + + +#macro(url_for_lens)#{url_for_home}#lens#end + +#macro(url_for_start $start)#url_for_home#lens&start=$start#end + +#macro(url_for_filters $p)#url_for_home?#q#boostPrice#spatial#qOpts#if($list.size($p) > 0)&#fqs($p)#end#debug#end + +#macro(url_for_nested_facet_query $field)#url_for_home#lens&fq=$esc.url($field)#end + +## TODO: convert to use {!raw f=$field}$value (with escaping of course) +#macro(url_for_facet_filter $field $value)#url_for_home#lens&fq=#if($value!=$null)$esc.url($field):%22$esc.url($value)%22#else-$esc.url($field):[*+TO+*]#end#end + +#macro(url_for_facet_date_filter $field $value)#url_for_home#lens&fq=$esc.url($field):$esc.url($value)#end + +#macro(url_for_facet_range_filter $field $value)#url_for_home#lens&fq=$esc.url($field):$esc.url($value)#end + + +#macro(link_to_previous_page $text) + #if($page.current_page_number > 1) + #set($prev_start = $page.start - $page.results_per_page) + $text + #end +#end + +#macro(link_to_next_page $text) + #if($page.current_page_number < $page.page_count) + #set($next_start = $page.start + $page.results_per_page) + $text + #end +#end + +#macro(link_to_page $page_number $text) + #if($page_number == $page.current_page_number) + $text + #else + #if($page_number <= $page.page_count) + #set($page_start = $page_number * $page.results_per_page - $page.results_per_page) + $text + #end + #end +#end + +#macro(display_facet_query $field, $display, $fieldName) + #if($field.size() > 0) + $display +
        + #foreach ($facet in $field) + #if ($facet.value > 0) + #set($facetURL = "#url_for_nested_facet_query($facet.key)") + #if ($facetURL != '') +
      • $facet.key ($facet.value)
      • + #end + #end + #end +
      + #end +#end + + +#macro(display_facet_range $field, $display, $fieldName, $start, $end, $gap, $before, $after) + $display +
        + #if($before && $before != "") + #set($value = "[* TO " + "#format_value($start)" + "}") + #set($facetURL = "#url_for_facet_range_filter($fieldName, $value)") +
      • Less than #format_value($start) ($before)
      • + #end + #foreach ($facet in $field) + #set($rangeEnd = "#range_get_to_value($facet.key, $gap)") + #set($value = "[" + $facet.key + " TO " + $rangeEnd + "}") + #set($facetURL = "#url_for_facet_range_filter($fieldName, $value)") + #if ($facetURL != '') +
      • $facet.key - #format_value($rangeEnd) ($facet.value)
      • + #end + #end + #if($end && $end != "" && $after > 0) + #set($value = "[" + "#format_value($end)" + " TO *}") + #set($facetURL = "#url_for_facet_range_filter($fieldName, $value)") +
      • More than #format_value($end) ($after)
      • + #end +
      +#end + +## $pivots is a list of facet_pivot +#macro(display_facet_pivot $pivots, $display) + #if($pivots.size() > 0) + $display + + #end +#end + +#macro(field $f) + #if($response.response.highlighting.get($docId).get($f).get(0)) + #set($pad = "") + #foreach($v in $response.response.highlighting.get($docId).get($f)) +$pad$v## + #set($pad = " ... ") + #end + #else + #foreach($v in $doc.getFieldValues($f)) +$v## + #end + #end +#end + +#macro(utc_date $theDate) +$date.format("yyyy-MM-dd'T'HH:mm:ss'Z'",$theDate,$date.getLocale(),$date.getTimeZone().getTimeZone("UTC"))## +#end + +#macro(format_value $val) +#if(${val.class.name} == "java.util.Date") +#utc_date($val)## +#else +$val## +#end +#end + +#macro(range_get_to_value $inval, $gapval) +#if(${gapval.class.name} == "java.lang.String") +$inval$gapval## +#elseif(${gapval.class.name} == "java.lang.Float" || ${inval.class.name} == "java.lang.Float") +$math.toDouble($math.add($inval,$gapval))## +#else +$math.add($inval,$gapval)## +#end +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/browse.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/browse.vm new file mode 100644 index 0000000000..10ecaeb8e9 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/browse.vm @@ -0,0 +1,33 @@ +#** + * Main entry point into the /browse templates + *# + +#set($searcher = $request.searcher) +#set($params = $request.params) +#set($clusters = $response.response.clusters) +#set($mltResults = $response.response.get("moreLikeThis")) +#set($annotate = $params.get("annotateBrowse")) +#parse('query_form.vm') +#parse('did_you_mean.vm') + + + + + +## Show Error Message, if any +
      + #parse("error.vm") +
      + +## Render Results, actual matching docs +
      + #parse("results_list.vm") +
      + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/cluster.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/cluster.vm new file mode 100644 index 0000000000..09885f3e9c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/cluster.vm @@ -0,0 +1,19 @@ +#** + * Check if Clustering is Enabled and then + * call cluster_results.vm + *# + +

      + Clusters +

      + +## Div tag has placeholder text by default +
      + Run Solr with option -Dsolr.clustering.enabled=true to see clustered search results. +
      + +## Replace the div content *if* Carrot^2 is available + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/cluster_results.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/cluster_results.vm new file mode 100644 index 0000000000..204480d5de --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/cluster_results.vm @@ -0,0 +1,31 @@ +#** + * Actual rendering of Clusters + *# + +## For each cluster +#foreach ($clusters in $response.response.clusters) + + #set($labels = $clusters.get('labels')) + #set($docs = $clusters.get('docs')) + + ## This Cluster's Heading +

      + #foreach ($label in $labels) + ## Keep the following line together to prevent + ## a space appearing before each comma + $label#if( $foreach.hasNext ),#end + #end +

      + + ## This Cluster's Documents +
        + ## For each doc in this cluster + #foreach ($cluDoc in $docs) +
      1. + + $cluDoc +
      2. + #end +
      + +#end ## end for each Cluster diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/debug.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/debug.vm new file mode 100644 index 0000000000..8f6d232805 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/debug.vm @@ -0,0 +1,28 @@ +#** + * Show Debugging Information, if enabled + *# + +#if( $params.getBool("debugQuery",false) ) + + toggle explain + +
      +    $response.getExplainMap().get($doc.getFirstValue('id'))
      +  
      + + + toggle all fields + + + #foreach($fieldname in $doc.fieldNames) +
      + $fieldname : + + #foreach($value in $doc.getFieldValues($fieldname)) + $esc.html($value) + #end + +
      + #end +
      +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/did_you_mean.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/did_you_mean.vm new file mode 100644 index 0000000000..606733afc4 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/did_you_mean.vm @@ -0,0 +1,11 @@ +#** + * Hyperlinked spelling suggestions in results list + *# + +#set($collations = $response.response.spellcheck.collations.getAll("collation")) +#if($collations.size() > 0) + Did you mean + #foreach($collation in $collations) + $esc.html($collation.collationQuery) ($collation.hits)? + #end +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/error.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/error.vm new file mode 100644 index 0000000000..80b5819791 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/error.vm @@ -0,0 +1,11 @@ +#** + * Show Error Message, if any + *# + +## Show Error Message, if any +## Usually rendered inside div class=error + +#if( $response.response.error.code ) +

      ERROR $response.response.error.code

      + $response.response.error.msg +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm new file mode 100644 index 0000000000..292681767b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm @@ -0,0 +1,24 @@ +#** + * Display facets based on field values + * e.g.: fields specified by &facet.field= + *# + +#if($response.facetFields) +

      + Field Facets +

      + #foreach($field in $response.facetFields) + ## Hide facets without value + #if($field.values.size() > 0) + $field.name + + #end ## end if > 0 + #end ## end for each facet field +#end ## end if response has facet fields diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_pivot.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_pivot.vm new file mode 100644 index 0000000000..7aa50da3fd --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_pivot.vm @@ -0,0 +1,12 @@ +#** + * Display Pivot-Based Facets + * e.g.: facets specified by &facet.pivot= + *# + +

      + Pivot Facets +

      + +#set($pivot = $response.response.facet_counts.facet_pivot) + +#display_facet_pivot($pivot, "") diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_queries.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_queries.vm new file mode 100644 index 0000000000..37489c7e00 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_queries.vm @@ -0,0 +1,12 @@ +#** + * Display facets based on specific facet queries + * e.g.: facets specified by &facet.query= + *# + +#set($field = $response.response.facet_counts.facet_queries) + +

      + Query Facets +

      + +#display_facet_query($field, "", "") diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_ranges.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_ranges.vm new file mode 100644 index 0000000000..a769415472 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_ranges.vm @@ -0,0 +1,23 @@ +#** + * Display facets based on ranges of values, AKA "Bukets" + * e.g.: ranges specified by &facet.range= + *# + +

      + Range Facets +

      + +#foreach ($field in $response.response.facet_counts.facet_ranges) + ## Hide facets without value + #if($field.value.counts.size() > 0) + #set($name = $field.key) + #set($display = $name) + #set($f = $field.value.counts) + #set($start = $field.value.start) + #set($end = $field.value.end) + #set($gap = $field.value.gap) + #set($before = $field.value.before) + #set($after = $field.value.after) + #display_facet_range($f, $display, $name, $start, $end, $gap, $before, $after) + #end ## end if has any values +#end ## end for each facet range diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facets.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facets.vm new file mode 100644 index 0000000000..55d40c9abc --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facets.vm @@ -0,0 +1,10 @@ +#** + * Overall Facet display block + * Invokes the 4 facet and 1 cluster template + *# + +#parse('facet_fields.vm') +#parse('facet_queries.vm') +#parse('facet_ranges.vm') +#parse('facet_pivot.vm') +#parse('cluster.vm') diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/footer.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/footer.vm new file mode 100644 index 0000000000..0604c34cc2 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/footer.vm @@ -0,0 +1,43 @@ +#** + * Render the bottom section of the page visible to users + *# + +
      +
      + Options: + + #if($request.params.get('debugQuery')) + + disable debug + #else + + enable debug + #end + - + #if($annotate) + + disable annotation + #else + + enable annotation + #end + - + + XML results + +
      + +
      + Generated by VelocityResponseWriter +
      +
      + Documentation: + Solr Home Page, + Solr Wiki +
      +
      + Disclaimer: + The locations displayed in this demonstration are purely fictional. + It is more than likely that no store with the items listed actually + exists at that location! +
      diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm new file mode 100644 index 0000000000..f1ff5c30c9 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm @@ -0,0 +1,37 @@ +#** + * Provide elements for the section of the HTML document + *# + + ## An example of using an arbitrary request parameter + #param('title') + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/header.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/header.vm new file mode 100644 index 0000000000..a4084511b0 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/header.vm @@ -0,0 +1,7 @@ +#** + * Render the top section of the page visible to users + *# + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit.vm new file mode 100644 index 0000000000..a9c11f4112 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit.vm @@ -0,0 +1,25 @@ +#** + * Called for each matching document but then + * calls one of product_doc, join_doc or richtext_doc + * depending on which fields the doc has + *# + +#set($docId = $doc.getFieldValue('id')) + +
      + + ## Has a "name" field ? + #if($doc.getFieldValue('name')) + #parse("product_doc.vm") + + ## Has a "compName_s" field ? + #elseif($doc.getFieldValue('compName_s')) + #parse("join_doc.vm") + + ## Fallback to richtext_doc + #else + #parse("richtext_doc.vm") + + #end + +
      diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit_grouped.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit_grouped.vm new file mode 100644 index 0000000000..5297f1e9aa --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit_grouped.vm @@ -0,0 +1,43 @@ +#** + * Display grouped results + *# + +
      + +
      + $grouping.key +
      + +
      + Total Matches in Group: $grouping.value.matches +
      + +
      ## list of groups + + #foreach ($group in $grouping.value.groups) +
      + #if($group.groupValue)$group.groupValue#{else}No group#end + + ($group.doclist.numFound) + +
      + +
      + #foreach ($doc in $group.doclist) + #set($docId = $doc.getFieldValue('id')) + #if($doc.getFieldValue('name')) + #parse("product_doc.vm") + #elseif($doc.getFieldValue('compName_s')) + #parse("join_doc.vm") + #else + #parse("richtext_doc.vm") + #end + #end +
      + + #end ## end of foreach group in grouping.value.groups +
      ## div tag for entire list of groups + +
      ## end of div class=result-document diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit_plain.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit_plain.vm new file mode 100644 index 0000000000..193439b59d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/hit_plain.vm @@ -0,0 +1,25 @@ +#** + * An extremely plain / debug version of hit.vm + *# + + + ## For each field + #foreach( $fieldName in $doc.fieldNames ) + ## For each value + #foreach( $value in $doc.getFieldValues($fieldName) ) + + ## Field Name + + ## Field Value(s) + + + #end ## end for each value + #end ## end for each field +
      + #if( $foreach.count == 1 ) + $fieldName: + #end + + $esc.html($value)
      +
      +
      diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/join_doc.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/join_doc.vm new file mode 100644 index 0000000000..9956012b49 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/join_doc.vm @@ -0,0 +1,20 @@ +#** + * Display documents that are joined to other documents + *# + +
      + #field('compName_s') +
      + +
      + Id: #field('id') + (company-details document for + join + ) +
      + +
      + Address: #field('address_s') +
      + +#parse('debug.vm') diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.css b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.css new file mode 100644 index 0000000000..97a62e0bbc --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.css @@ -0,0 +1,48 @@ +.ac_results { + padding: 0px; + border: 1px solid black; + background-color: white; + overflow: hidden; + z-index: 99999; +} + +.ac_results ul { + width: 100%; + list-style-position: outside; + list-style: none; + padding: 0; + margin: 0; +} + +.ac_results li { + margin: 0px; + padding: 2px 5px; + cursor: default; + display: block; + /* + if width will be 100% horizontal scrollbar will apear + when scroll mode will be used + */ + /*width: 100%;*/ + font: menu; + font-size: 12px; + /* + it is very important, if line-height not setted or setted + in relative units scroll will be broken in firefox + */ + line-height: 16px; + overflow: hidden; +} + +.ac_loading { + background: white url('indicator.gif') right center no-repeat; +} + +.ac_odd { + background-color: #eee; +} + +.ac_over { + background-color: #0A246A; + color: white; +} diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.js b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.js new file mode 100644 index 0000000000..442f5a0d89 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.js @@ -0,0 +1,763 @@ +/* + * Autocomplete - jQuery plugin 1.1pre + * + * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: Id: jquery.autocomplete.js 5785 2008-07-12 10:37:33Z joern.zaefferer $ + * + */ + +;(function($) { + +$.fn.extend({ + autocomplete: function(urlOrData, options) { + var isUrl = typeof urlOrData == "string"; + options = $.extend({}, $.Autocompleter.defaults, { + url: isUrl ? urlOrData : null, + data: isUrl ? null : urlOrData, + delay: isUrl ? $.Autocompleter.defaults.delay : 10, + max: options && !options.scroll ? 10 : 150 + }, options); + + // if highlight is set to false, replace it with a do-nothing function + options.highlight = options.highlight || function(value) { return value; }; + + // if the formatMatch option is not specified, then use formatItem for backwards compatibility + options.formatMatch = options.formatMatch || options.formatItem; + + return this.each(function() { + new $.Autocompleter(this, options); + }); + }, + result: function(handler) { + return this.bind("result", handler); + }, + search: function(handler) { + return this.trigger("search", [handler]); + }, + flushCache: function() { + return this.trigger("flushCache"); + }, + setOptions: function(options){ + return this.trigger("setOptions", [options]); + }, + unautocomplete: function() { + return this.trigger("unautocomplete"); + } +}); + +$.Autocompleter = function(input, options) { + + var KEY = { + UP: 38, + DOWN: 40, + DEL: 46, + TAB: 9, + RETURN: 13, + ESC: 27, + COMMA: 188, + PAGEUP: 33, + PAGEDOWN: 34, + BACKSPACE: 8 + }; + + // Create $ object for input element + var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); + + var timeout; + var previousValue = ""; + var cache = $.Autocompleter.Cache(options); + var hasFocus = 0; + var lastKeyPressCode; + var config = { + mouseDownOnSelect: false + }; + var select = $.Autocompleter.Select(options, input, selectCurrent, config); + + var blockSubmit; + + // prevent form submit in opera when selecting with return key + $.browser.opera && $(input.form).bind("submit.autocomplete", function() { + if (blockSubmit) { + blockSubmit = false; + return false; + } + }); + + // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all + $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { + // track last key pressed + lastKeyPressCode = event.keyCode; + switch(event.keyCode) { + + case KEY.UP: + event.preventDefault(); + if ( select.visible() ) { + select.prev(); + } else { + onChange(0, true); + } + break; + + case KEY.DOWN: + event.preventDefault(); + if ( select.visible() ) { + select.next(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEUP: + event.preventDefault(); + if ( select.visible() ) { + select.pageUp(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEDOWN: + event.preventDefault(); + if ( select.visible() ) { + select.pageDown(); + } else { + onChange(0, true); + } + break; + + // matches also semicolon + case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: + case KEY.TAB: + case KEY.RETURN: + if( selectCurrent() ) { + // stop default to prevent a form submit, Opera needs special handling + event.preventDefault(); + blockSubmit = true; + return false; + } + break; + + case KEY.ESC: + select.hide(); + break; + + default: + clearTimeout(timeout); + timeout = setTimeout(onChange, options.delay); + break; + } + }).focus(function(){ + // track whether the field has focus, we shouldn't process any + // results if the field no longer has focus + hasFocus++; + }).blur(function() { + hasFocus = 0; + if (!config.mouseDownOnSelect) { + hideResults(); + } + }).click(function() { + // show select when clicking in a focused field + if ( hasFocus++ > 1 && !select.visible() ) { + onChange(0, true); + } + }).bind("search", function() { + // TODO why not just specifying both arguments? + var fn = (arguments.length > 1) ? arguments[1] : null; + function findValueCallback(q, data) { + var result; + if( data && data.length ) { + for (var i=0; i < data.length; i++) { + if( data[i].result.toLowerCase() == q.toLowerCase() ) { + result = data[i]; + break; + } + } + } + if( typeof fn == "function" ) fn(result); + else $input.trigger("result", result && [result.data, result.value]); + } + $.each(trimWords($input.val()), function(i, value) { + request(value, findValueCallback, findValueCallback); + }); + }).bind("flushCache", function() { + cache.flush(); + }).bind("setOptions", function() { + $.extend(options, arguments[1]); + // if we've updated the data, repopulate + if ( "data" in arguments[1] ) + cache.populate(); + }).bind("unautocomplete", function() { + select.unbind(); + $input.unbind(); + $(input.form).unbind(".autocomplete"); + }); + + + function selectCurrent() { + var selected = select.selected(); + if( !selected ) + return false; + + var v = selected.result; + previousValue = v; + + if ( options.multiple ) { + var words = trimWords($input.val()); + if ( words.length > 1 ) { + v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v; + } + v += options.multipleSeparator; + } + + $input.val(v); + hideResultsNow(); + $input.trigger("result", [selected.data, selected.value]); + return true; + } + + function onChange(crap, skipPrevCheck) { + if( lastKeyPressCode == KEY.DEL ) { + select.hide(); + return; + } + + var currentValue = $input.val(); + + if ( !skipPrevCheck && currentValue == previousValue ) + return; + + previousValue = currentValue; + + currentValue = lastWord(currentValue); + if ( currentValue.length >= options.minChars) { + $input.addClass(options.loadingClass); + if (!options.matchCase) + currentValue = currentValue.toLowerCase(); + request(currentValue, receiveData, hideResultsNow); + } else { + stopLoading(); + select.hide(); + } + }; + + function trimWords(value) { + if ( !value ) { + return [""]; + } + var words = value.split( options.multipleSeparator ); + var result = []; + $.each(words, function(i, value) { + if ( $.trim(value) ) + result[i] = $.trim(value); + }); + return result; + } + + function lastWord(value) { + if ( !options.multiple ) + return value; + var words = trimWords(value); + return words[words.length - 1]; + } + + // fills in the input box w/the first match (assumed to be the best match) + // q: the term entered + // sValue: the first matching result + function autoFill(q, sValue){ + // autofill in the complete box w/the first match as long as the user hasn't entered in more data + // if the last user key pressed was backspace, don't autofill + if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { + // fill in the value (keep the case the user has typed) + $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); + // select the portion of the value not typed by the user (so the next character will erase) + $.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length); + } + }; + + function hideResults() { + clearTimeout(timeout); + timeout = setTimeout(hideResultsNow, 200); + }; + + function hideResultsNow() { + var wasVisible = select.visible(); + select.hide(); + clearTimeout(timeout); + stopLoading(); + if (options.mustMatch) { + // call search and run callback + $input.search( + function (result){ + // if no value found, clear the input box + if( !result ) { + if (options.multiple) { + var words = trimWords($input.val()).slice(0, -1); + $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); + } + else + $input.val( "" ); + } + } + ); + } + if (wasVisible) + // position cursor at end of input field + $.Autocompleter.Selection(input, input.value.length, input.value.length); + }; + + function receiveData(q, data) { + if ( data && data.length && hasFocus ) { + stopLoading(); + select.display(data, q); + autoFill(q, data[0].value); + select.show(); + } else { + hideResultsNow(); + } + }; + + function request(term, success, failure) { + if (!options.matchCase) + term = term.toLowerCase(); + var data = cache.load(term); + data = null; // Avoid buggy cache and go to Solr every time + // recieve the cached data + if (data && data.length) { + success(term, data); + // if an AJAX url has been supplied, try loading the data now + } else if( (typeof options.url == "string") && (options.url.length > 0) ){ + + var extraParams = { + timestamp: +new Date() + }; + $.each(options.extraParams, function(key, param) { + extraParams[key] = typeof param == "function" ? param() : param; + }); + + $.ajax({ + // try to leverage ajaxQueue plugin to abort previous requests + mode: "abort", + // limit abortion to this input + port: "autocomplete" + input.name, + dataType: options.dataType, + url: options.url, + data: $.extend({ + q: lastWord(term), + limit: options.max + }, extraParams), + success: function(data) { + var parsed = options.parse && options.parse(data) || parse(data); + cache.add(term, parsed); + success(term, parsed); + } + }); + } else { + // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match + select.emptyList(); + failure(term); + } + }; + + function parse(data) { + var parsed = []; + var rows = data.split("\n"); + for (var i=0; i < rows.length; i++) { + var row = $.trim(rows[i]); + if (row) { + row = row.split("|"); + parsed[parsed.length] = { + data: row, + value: row[0], + result: options.formatResult && options.formatResult(row, row[0]) || row[0] + }; + } + } + return parsed; + }; + + function stopLoading() { + $input.removeClass(options.loadingClass); + }; + +}; + +$.Autocompleter.defaults = { + inputClass: "ac_input", + resultsClass: "ac_results", + loadingClass: "ac_loading", + minChars: 1, + delay: 400, + matchCase: false, + matchSubset: true, + matchContains: false, + cacheLength: 10, + max: 100, + mustMatch: false, + extraParams: {}, + selectFirst: false, + formatItem: function(row) { return row[0]; }, + formatMatch: null, + autoFill: false, + width: 0, + multiple: false, + multipleSeparator: ", ", + highlight: function(value, term) { + return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); + }, + scroll: true, + scrollHeight: 180 +}; + +$.Autocompleter.Cache = function(options) { + + var data = {}; + var length = 0; + + function matchSubset(s, sub) { + if (!options.matchCase) + s = s.toLowerCase(); + var i = s.indexOf(sub); + if (options.matchContains == "word"){ + i = s.toLowerCase().search("\\b" + sub.toLowerCase()); + } + if (i == -1) return false; + return i == 0 || options.matchContains; + }; + + function add(q, value) { + if (length > options.cacheLength){ + flush(); + } + if (!data[q]){ + length++; + } + data[q] = value; + } + + function populate(){ + if( !options.data ) return false; + // track the matches + var stMatchSets = {}, + nullData = 0; + + // no url was specified, we need to adjust the cache length to make sure it fits the local data store + if( !options.url ) options.cacheLength = 1; + + // track all options for minChars = 0 + stMatchSets[""] = []; + + // loop through the array and create a lookup structure + for ( var i = 0, ol = options.data.length; i < ol; i++ ) { + var rawValue = options.data[i]; + // if rawValue is a string, make an array otherwise just reference the array + rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; + + var value = options.formatMatch(rawValue, i+1, options.data.length); + if ( value === false ) + continue; + + var firstChar = value.charAt(0).toLowerCase(); + // if no lookup array for this character exists, look it up now + if( !stMatchSets[firstChar] ) + stMatchSets[firstChar] = []; + + // if the match is a string + var row = { + value: value, + data: rawValue, + result: options.formatResult && options.formatResult(rawValue) || value + }; + + // push the current match into the set list + stMatchSets[firstChar].push(row); + + // keep track of minChars zero items + if ( nullData++ < options.max ) { + stMatchSets[""].push(row); + } + }; + + // add the data items to the cache + $.each(stMatchSets, function(i, value) { + // increase the cache size + options.cacheLength++; + // add to the cache + add(i, value); + }); + } + + // populate any existing data + setTimeout(populate, 25); + + function flush(){ + data = {}; + length = 0; + } + + return { + flush: flush, + add: add, + populate: populate, + load: function(q) { + if (!options.cacheLength || !length) + return null; + /* + * if dealing w/local data and matchContains than we must make sure + * to loop through all the data collections looking for matches + */ + if( !options.url && options.matchContains ){ + // track all matches + var csub = []; + // loop through all the data grids for matches + for( var k in data ){ + // don't search through the stMatchSets[""] (minChars: 0) cache + // this prevents duplicates + if( k.length > 0 ){ + var c = data[k]; + $.each(c, function(i, x) { + // if we've got a match, add it to the array + if (matchSubset(x.value, q)) { + csub.push(x); + } + }); + } + } + return csub; + } else + // if the exact item exists, use it + if (data[q]){ + return data[q]; + } else + if (options.matchSubset) { + for (var i = q.length - 1; i >= options.minChars; i--) { + var c = data[q.substr(0, i)]; + if (c) { + var csub = []; + $.each(c, function(i, x) { + if (matchSubset(x.value, q)) { + csub[csub.length] = x; + } + }); + return csub; + } + } + } + return null; + } + }; +}; + +$.Autocompleter.Select = function (options, input, select, config) { + var CLASSES = { + ACTIVE: "ac_over" + }; + + var listItems, + active = -1, + data, + term = "", + needsInit = true, + element, + list; + + // Create results + function init() { + if (!needsInit) + return; + element = $("
      ") + .hide() + .addClass(options.resultsClass) + .css("position", "absolute") + .appendTo(document.body); + + list = $("
        ").appendTo(element).mouseover( function(event) { + if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { + active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); + $(target(event)).addClass(CLASSES.ACTIVE); + } + }).click(function(event) { + $(target(event)).addClass(CLASSES.ACTIVE); + select(); + // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus + input.focus(); + return false; + }).mousedown(function() { + config.mouseDownOnSelect = true; + }).mouseup(function() { + config.mouseDownOnSelect = false; + }); + + if( options.width > 0 ) + element.css("width", options.width); + + needsInit = false; + } + + function target(event) { + var element = event.target; + while(element && element.tagName != "LI") + element = element.parentNode; + // more fun with IE, sometimes event.target is empty, just ignore it then + if(!element) + return []; + return element; + } + + function moveSelect(step) { + listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); + movePosition(step); + var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); + if(options.scroll) { + var offset = 0; + listItems.slice(0, active).each(function() { + offset += this.offsetHeight; + }); + if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { + list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); + } else if(offset < list.scrollTop()) { + list.scrollTop(offset); + } + } + }; + + function movePosition(step) { + active += step; + if (active < 0) { + active = listItems.size() - 1; + } else if (active >= listItems.size()) { + active = 0; + } + } + + function limitNumberOfItems(available) { + return options.max && options.max < available + ? options.max + : available; + } + + function fillList() { + list.empty(); + var max = limitNumberOfItems(data.length); + for (var i=0; i < max; i++) { + if (!data[i]) + continue; + var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); + if ( formatted === false ) + continue; + var li = $("
      • ").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0]; + $.data(li, "ac_data", data[i]); + } + listItems = list.find("li"); + if ( options.selectFirst ) { + listItems.slice(0, 1).addClass(CLASSES.ACTIVE); + active = 0; + } + // apply bgiframe if available + if ( $.fn.bgiframe ) + list.bgiframe(); + } + + return { + display: function(d, q) { + init(); + data = d; + term = q; + fillList(); + }, + next: function() { + moveSelect(1); + }, + prev: function() { + moveSelect(-1); + }, + pageUp: function() { + if (active != 0 && active - 8 < 0) { + moveSelect( -active ); + } else { + moveSelect(-8); + } + }, + pageDown: function() { + if (active != listItems.size() - 1 && active + 8 > listItems.size()) { + moveSelect( listItems.size() - 1 - active ); + } else { + moveSelect(8); + } + }, + hide: function() { + element && element.hide(); + listItems && listItems.removeClass(CLASSES.ACTIVE); + active = -1; + }, + visible : function() { + return element && element.is(":visible"); + }, + current: function() { + return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); + }, + show: function() { + var offset = $(input).offset(); + element.css({ + width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(), + top: offset.top + input.offsetHeight, + left: offset.left + }).show(); + if(options.scroll) { + list.scrollTop(0); + list.css({ + maxHeight: options.scrollHeight, + overflow: 'auto' + }); + + if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { + var listHeight = 0; + listItems.each(function() { + listHeight += this.offsetHeight; + }); + var scrollbarsVisible = listHeight > options.scrollHeight; + list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); + if (!scrollbarsVisible) { + // IE doesn't recalculate width when scrollbar disappears + listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); + } + } + + } + }, + selected: function() { + var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); + return selected && selected.length && $.data(selected[0], "ac_data"); + }, + emptyList: function (){ + list && list.empty(); + }, + unbind: function() { + element && element.remove(); + } + }; +}; + +$.Autocompleter.Selection = function(field, start, end) { + if( field.createTextRange ){ + var selRange = field.createTextRange(); + selRange.collapse(true); + selRange.moveStart("character", start); + selRange.moveEnd("character", end); + selRange.select(); + } else if( field.setSelectionRange ){ + field.setSelectionRange(start, end); + } else { + if( field.selectionStart ){ + field.selectionStart = start; + field.selectionEnd = end; + } + } + field.focus(); +}; + +})(jQuery); \ No newline at end of file diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/layout.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/layout.vm new file mode 100644 index 0000000000..50f4c1bc82 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/layout.vm @@ -0,0 +1,24 @@ +#** + * Overall HTML page layout + *# + + + + #parse("head.vm") + + + + +
        + #parse("tabs.vm") +
        +
        + $content +
        + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/main.css b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/main.css new file mode 100644 index 0000000000..67278fb7b5 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/main.css @@ -0,0 +1,231 @@ +#admin{ + text-align: right; + vertical-align: top; +} + +#head{ + width: 100%; +} +.array-field { + border: 2px solid #474747; + background: #FFE9D8; + padding: 5px; + margin: 5px; +} + +.array-field-list li { + list-style: circle; + margin-left: 20px; +} + +.parsed_query_header { + font-family: Helvetica, Arial, sans-serif; + font-size: 10pt; + font-weight: bold; +} + +.parsed_query { + font-family: Courier, Courier New, monospaced; + font-size: 10pt; + font-weight: normal; +} + +body { + font-family: Helvetica, Arial, sans-serif; + font-size: 10pt; +} + +a { + color: #43a4b1; +} + +.navigators { + float: left; + margin: 5px; + margin-top: 0px; + width: 185px; + padding: 5px; + top: -20px; + position: relative; +} + +.tabs-bar { + padding: 5px; + width: 100%; + border: 1px solid; + border-width: 0px 0px 1px 0px; +} +.tab { + font-weight: bold; + padding: 5px; + margin: 0px 5px; + border: 1px solid; + background-color: #dddddd; + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.tab:hover { + background: #FEC293; +} +.tab.selected { + background-color: #ffffff; + border-bottom: 1px solid #ffffff; +} + +.navigators h2 { + background: #FEC293; + padding: 2px 5px; +} + +.navigators ul { + list-style: none; + margin: 0; + margin-bottom: 5px; + margin-top: 5px; + padding-left: 10px; +} + +.navigators ul li { + color: #999; + padding: 2px; +} + + + +.facet-field { + font-weight: bold; +} + +.highlight { + color: white; + background-color: gray; + border: 1px black solid; +} + +.highlight-box { + margin-left: 15px; +} + +.field-name { + font-weight: bold; +} + +.highlighted-facet-field { + background: white; +} + +.constraints { + margin-top: 10px; +} + +#query-form{ + width: 80%; +} + + + +.query-box, .constraints { + padding: 5px; + margin: 5px; + font-weight: normal; + font-size: 24px; + letter-spacing: 0.08em; +} + +.query-box #q { + margin-left: 8px; + width: 60%; + height: 50px; + border: 1px solid #999; + font-size: 1em; + padding: 0.4em; +} + +.query-box { + +} + +.query-boost { + + top: 10px; + left: 50px; + position: relative; + font-size: 0.8em; +} + +.query-box .inputs{ + left: 180px; + position: relative; + +} + +#logo { + width: 115px; + margin: 0px 0px 20px 12px; + border-style: none; +} + +.pagination { + padding-left: 33%; + background: #eee; + margin: 5px; + margin-left: 210px; + padding-top: 5px; + padding-bottom: 5px; +} + +.result-document { + border: 1px solid #999; + padding: 5px; + margin: 5px; + margin-left: 210px; + margin-bottom: 15px; +} + +.result-document div{ + padding: 5px; +} + +.result-title{ + width:60%; +} + +.result-body{ + background: #ddd; +} + +.mlt{ + +} + +.map{ + float: right; + position: relative; + top: -25px; +} + +.result-document:nth-child(2n+1) { + background-color: #eee; +} + + +.selected-facet-field { + font-weight: bold; +} + +li.show { + list-style: disc; +} + +.group-value{ + font-weight: bold; +} + +.error { + color: white; + background-color: red; + left: 210px; + width:80%; + position: relative; + +} diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/mime_type_lists.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/mime_type_lists.vm new file mode 100644 index 0000000000..1468bbdbf7 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/mime_type_lists.vm @@ -0,0 +1,68 @@ +#** + * Define some Mime-Types, short and long form + *# + +## MimeType to extension map for detecting file type +## and showing proper icon +## List of types match the icons in /solr/img/filetypes + +## Short MimeType Names +## Was called $supportedtypes +#set($supportedMimeTypes = "7z;ai;aiff;asc;audio;bin;bz2;c;cfc;cfm;chm;class;conf;cpp;cs;css;csv;deb;divx;doc;dot;eml;enc;file;gif;gz;hlp;htm;html;image;iso;jar;java;jpeg;jpg;js;lua;m;mm;mov;mp3;mpg;odc;odf;odg;odi;odp;ods;odt;ogg;pdf;pgp;php;pl;png;ppt;ps;py;ram;rar;rb;rm;rpm;rtf;sig;sql;swf;sxc;sxd;sxi;sxw;tar;tex;tgz;txt;vcf;video;vsd;wav;wma;wmv;xls;xml;xpi;xvid;zip") + +## Long Form: map MimeType headers to our Short names +## Was called $extMap +#set( $mimeExtensionsMap = { + "application/x-7z-compressed": "7z", + "application/postscript": "ai", + "application/pgp-signature": "asc", + "application/octet-stream": "bin", + "application/x-bzip2": "bz2", + "text/x-c": "c", + "application/vnd.ms-htmlhelp": "chm", + "application/java-vm": "class", + "text/css": "css", + "text/csv": "csv", + "application/x-debian-package": "deb", + "application/msword": "doc", + "message/rfc822": "eml", + "image/gif": "gif", + "application/winhlp": "hlp", + "text/html": "html", + "application/java-archive": "jar", + "text/x-java-source": "java", + "image/jpeg": "jpeg", + "application/javascript": "js", + "application/vnd.oasis.opendocument.chart": "odc", + "application/vnd.oasis.opendocument.formula": "odf", + "application/vnd.oasis.opendocument.graphics": "odg", + "application/vnd.oasis.opendocument.image": "odi", + "application/vnd.oasis.opendocument.presentation": "odp", + "application/vnd.oasis.opendocument.spreadsheet": "ods", + "application/vnd.oasis.opendocument.text": "odt", + "application/pdf": "pdf", + "application/pgp-encrypted": "pgp", + "image/png": "png", + "application/vnd.ms-powerpoint": "ppt", + "audio/x-pn-realaudio": "ram", + "application/x-rar-compressed": "rar", + "application/vnd.rn-realmedia": "rm", + "application/rtf": "rtf", + "application/x-shockwave-flash": "swf", + "application/vnd.sun.xml.calc": "sxc", + "application/vnd.sun.xml.draw": "sxd", + "application/vnd.sun.xml.impress": "sxi", + "application/vnd.sun.xml.writer": "sxw", + "application/x-tar": "tar", + "application/x-tex": "tex", + "text/plain": "txt", + "text/x-vcard": "vcf", + "application/vnd.visio": "vsd", + "audio/x-wav": "wav", + "audio/x-ms-wma": "wma", + "video/x-ms-wmv": "wmv", + "application/vnd.ms-excel": "xls", + "application/xml": "xml", + "application/x-xpinstall": "xpi", + "application/zip": "zip" +}) diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/pagination_bottom.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/pagination_bottom.vm new file mode 100644 index 0000000000..71b8bdf218 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/pagination_bottom.vm @@ -0,0 +1,22 @@ +#** + * Paging and Statistics at bottom of results + *# + +## Usually rendered in pagination div tag + +#if($response.response.get('grouped')) + ## pass +#else + + #link_to_previous_page("previous") + + $page.results_found + results found. + + Page $page.current_page_number + of $page.page_count + + #link_to_next_page("next") + +#end +
        diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/pagination_top.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/pagination_top.vm new file mode 100644 index 0000000000..e0ac8ac89b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/pagination_top.vm @@ -0,0 +1,29 @@ +#** + * Paging and Statistics at top of results + *# + +## Usually rendered in pagination div tag + +## Grouped Results / Not Paginated +#if($response.response.get('grouped')) + + + + $response.response.get('grouped').size() group(s) + + found in ${response.responseHeader.QTime} ms + + +## Regular Results / Use Paging Links if needed +#else + + + $page.results_found + results found in + ${response.responseHeader.QTime} ms + + + Page $page.current_page_number + of $page.page_count + +#end ## end else non-grouped results, normal pagination diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/product_doc.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/product_doc.vm new file mode 100644 index 0000000000..c878d8c13b --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/product_doc.vm @@ -0,0 +1,32 @@ +#** + * Render a hit representing a Product + * assumed to have a field called "name" + *# + +
        #field('name') #if($params.getBool('mlt', false) == false)More Like This#end
        +##do we have a physical store for this product +#set($store = $doc.getFieldValue('store')) +#if($store)#end +
        Id: #field('id')
        +
        Price: #field('price_c')
        +
        Features: #field('features')
        +
        In Stock: #field('inStock')
        +
        + #set($mlt = $mltResults.get($docId)) + #set($mltOn = $params.getBool('mlt')) + #if($mltOn == true)
        Similar Items
        #end + #if ($mltOn && $mlt && $mlt.size() > 0) +
          + #foreach($mltHit in $mlt) + #set($mltId = $mltHit.getFieldValue('id')) +
        • Name: $mltHit.getFieldValue('name')
          +
          Price: $!number.currency($mltHit.getFieldValue('price')) In Stock: $mltHit.getFieldValue('inStock')
          + +
        • + #end +
        + #elseif($mltOn && $mlt.size() == 0) +
        No Similar Items Found
        + #end +
        +#parse('debug.vm') diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query.vm new file mode 100644 index 0000000000..ddbab3fcf7 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query.vm @@ -0,0 +1,42 @@ +
        +
        +
        + Find: +
        Boost by Price + #parse("querySpatial.vm") + #parse("queryGroup.vm") +
        +
        + + #if($request.params.get('debugQuery')) + + #end + #if($annotate == true) + + #end + #foreach($fq in $request.params.getParams('fq')) + #if ($fq != "{!bbox}") + + #end + #end +
        + #foreach($fq in $params.getParams('fq')) + #set($previous_fq_count=$velocityCount - 1) + #if($fq != '') + > $fq + #end + #end +
        +
        + #if($request.params.get('debugQuery')) + toggle parsed query + + #end + #set($queryOpts = $request.params.get("queryOpts")) + #if($queryOpts && $queryOpts != "") + + #end +
        +
        + +
        diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_form.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_form.vm new file mode 100644 index 0000000000..70a0af20ff --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_form.vm @@ -0,0 +1,64 @@ +#** + * Renders the main query form + *# + +
        +
        + +
        + + Find: + + + + +
        + + + Boost by Price + + + #parse("query_spatial.vm") + #parse("query_group.vm") +
        +
        + + #if($request.params.get('debugQuery')) + + #end + #if($annotate == true) + + #end + #foreach($fq in $request.params.getParams('fq')) + #if ($fq != "{!bbox}") + + #end + #end + +
        + #foreach($fq in $params.getParams('fq')) + #set($previous_fq_count=$velocityCount - 1) + #if($fq != '') + > + $fq + #end + #end +
        + +
        + #if($request.params.get('debugQuery')) + toggle parsed query + + #end + #set($queryOpts = $request.params.get("queryOpts")) + #if($queryOpts && $queryOpts != "") + + #end +
        + +
        +
        diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_group.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_group.vm new file mode 100644 index 0000000000..42e54573ec --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_group.vm @@ -0,0 +1,43 @@ +#** + * Query settings for grouping by fields, + * e.g.: Manufacturer or Popularity + *# + +#set($queryOpts = $params.get("queryOpts")) + +#if($queryOpts == "group") +
        + #set($groupF = $request.params.get('group.field')) + + + + + +
        + +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_spatial.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_spatial.vm new file mode 100644 index 0000000000..2bc204493d --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/query_spatial.vm @@ -0,0 +1,75 @@ +#** + * Query logic for selecting location / Geospatial search + *# + +#set($queryOpts = $params.get("queryOpts")) + +#if($queryOpts == "spatial") + +
        + + #set($loc = $request.params.get('pt')) + ## Normalize first trip through to "none" because + ## an empty string generates an error message later on + #if( ! $loc ) + #set( $loc = "none" ) + #end + + #set($dist = $request.params.get('d', "10")) + + ## Cities for The Select List + #set( $cities = { + "none": "No Filter", + "45.17614,-93.87341": "Buffalo, MN", + "37.7752,-100.0232": "Dodge City, KS", + "35.0752,-97.032": "Oklahoma City, OK", + "37.7752,-122.4232": "San Francisco CA" + }) + + + + + Distance (KM): + + + + + + + +
        + + + +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/results_list.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/results_list.vm new file mode 100644 index 0000000000..f73532b2d4 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/results_list.vm @@ -0,0 +1,22 @@ +#** + * Render the main Results List + *# + +## Usually displayed inside
        + +#if($response.response.get('grouped')) + + #foreach($grouping in $response.response.get('grouped')) + #parse("hit_grouped.vm") + #end + +#else + + #foreach($doc in $response.results) + #parse("hit.vm") + ## Can get an extremely simple view of the doc + ## which might be nicer for debugging + ##parse("hit_plain.vm") + #end + +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/richtext_doc.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/richtext_doc.vm new file mode 100644 index 0000000000..9e8d6cb71c --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/richtext_doc.vm @@ -0,0 +1,153 @@ +#** + * Render a complex document in the results list + *# + +## Load Mime-Type List and Mapping +#parse('mime_type_lists.vm') +## Sets: +## * supportedMimeTypes, AKA supportedtypes +## * mimeExtensionsMap, AKA extMap + +## Title +#if($doc.getFieldValue('title')) + #set($title = $esc.html($doc.getFirstValue('title'))) +#else + #set($title = "["+$doc.getFieldValue('id')+"]") +#end + +## URL +#if($doc.getFieldValue('url')) + #set($url = $doc.getFieldValue('url')) +#elseif($doc.getFieldValue('resourcename')) + #set($url = "file:///$doc.getFieldValue('resourcename')") +#else + #set($url = "$doc.getFieldValue('id')") +#end + +## Sort out Mime-Type +#set($ct = $list.get($doc.getFirstValue('content_type').split(";"),0)) +#set($filename = $doc.getFieldValue('resourcename')) +#set($filetype = false) +#set($filetype = $mimeExtensionsMap.get($ct)) + +## TODO: falling back to file extension is convenient, +## except when you don't have an icon for that extension +## example "application/vnd.openxmlformats-officedocument.wordprocessingml.document" +## document with a .docx extension. +## It'd be nice to fall back to an "unknown" or the existing "file" type +## We sort of do this below, but only if the filename has no extension +## (anything after the last dot). + +#if(!$filetype) + #set($filetype = $filename.substring($filename.lastIndexOf(".")).substring(1)) +#end + +## #if(!$filetype) +## #set($filetype = "file") +## #end +## #if(!$supportedMimeTypes.contains($filetype)) +## #set($filetype = "file") +## #end + +## Row 1: Icon and Title and mlt link +
        + ## Icon + ## Small file type icons from http://www.splitbrain.org/projects/file_icons (public domain) + + + ## Title, hyperlinked + + $title + + ## Link for MLT / More Like This / Find Similar + + #if($params.getBool('mlt', false) == false) + + More Like This + #end + + +
        + +## Row 2?: ID / URL +
        + Id: #field('id') +
        + +## Resource Name +
        + #if($doc.getFieldValue('resourcename')) + Resource name: $filename + #elseif($url) + URL: $url + #end + #if($ct) + ($ct) + #end +
        + +## Author +#if($doc.getFieldValue('author')) +
        + Author: #field('author') +
        +#end + +## Last_Modified Date +#if($doc.getFieldValue('last_modified')) +
        + last-modified: + #field('last_modified') +
        +#end + +## Main content of doc +
        + #field('content') +
        + +## Display Similar Documents / MLT = More Like This +
        + #set($mlt = $mltResults.get($docId)) + #set($mltOn = $params.getBool('mlt')) + #if($mltOn == true) +
        + Similar Items +
        + #end + ## If has MLT enabled An Entries to show + #if ($mltOn && $mlt && $mlt.size() > 0) +
          + #foreach($mltHit in $mlt) + #set($mltId = $mltHit.getFieldValue('id')) +
        • + +
          + + Title: + + $mltHit.getFieldValue('title') +
          +
          + + Author: + + $mltHit.getFieldValue('author') + + Description: + + $mltHit.getFieldValue('description') +
          +
        • + #end ## end for each mltHit in $mlt +
        + ## Else MLT Enabled but no mlt results for this query + #elseif($mltOn && $mlt.size() == 0) +
        No Similar Items Found
        + #end +
        ## div class=mlt + +#parse('debug.vm') diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/suggest.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/suggest.vm new file mode 100644 index 0000000000..dae6b830d2 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/suggest.vm @@ -0,0 +1,8 @@ +#** + * Provides cynamic spelling suggestions + * as you type in the search form + *# + +#foreach($t in $response.response.terms.name) + $t.key +#end diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/tabs.vm b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/tabs.vm new file mode 100644 index 0000000000..da19cbc0b7 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/tabs.vm @@ -0,0 +1,50 @@ +#** + * Provides navigation/access to Advanced search options + * Usually displayed near the top of the page + *# + +##TODO: Make some nice tabs here + +#set($queryOpts = $params.get("queryOpts")) + +
        + + Type of Search: + + ##queryOpts=$queryOpts + + ## return to Simple Search + ##set( $selected = ($queryOpts && $queryOpts != "") ) + #set( $selected = ! $queryOpts ) + + #if($selected) + Simple + #else + + Simple + #end + + + ## GEO-Spatial / Location Based + #set( $selected = ($queryOpts == "spatial") ) + + #if($selected) + Spatial + #else + + Spatial + #end + + + ## Group By Field + #set( $selected = ($queryOpts == "group") ) + + #if($selected) + Group By + #else + + Group By + #end + + +
        diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example.xsl b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example.xsl new file mode 100644 index 0000000000..b899270082 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example.xsl @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + <xsl:value-of select="$title"/> + + + +

        +
        + This has been formatted by the sample "example.xsl" transform - + use your own XSLT to get a nicer page +
        + + + +
        + + + +
        + + + + +
        +
        +
        + + + + + + + + + + + + + + javascript:toggle("");? +
        + + exp + + + + + +
        + + +
        + + + + + + + +
          + +
        • +
          +
        + + +
        + + + + + + + + + + + + + + + + + + + + +
        diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_atom.xsl b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_atom.xsl new file mode 100644 index 0000000000..b6c23151dc --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_atom.xsl @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + Example Solr Atom 1.0 Feed + + This has been formatted by the sample "example_atom.xsl" transform - + use your own XSLT to get a nicer Atom feed. + + + Apache Solr + solr-user@lucene.apache.org + + + + + + tag:localhost,2007:example + + + + + + + + + <xsl:value-of select="str[@name='name']"/> + + tag:localhost,2007: + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl new file mode 100644 index 0000000000..c8ab5bfb1e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl @@ -0,0 +1,66 @@ + + + + + + + + + + + + + Example Solr RSS 2.0 Feed + http://localhost:8983/solr + + This has been formatted by the sample "example_rss.xsl" transform - + use your own XSLT to get a nicer RSS feed. + + en-us + http://localhost:8983/solr + + + + + + + + + + + <xsl:value-of select="str[@name='name']"/> + + http://localhost:8983/solr/select?q=id: + + + + + + + http://localhost:8983/solr/select?q=id: + + + + diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/luke.xsl b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/luke.xsl new file mode 100644 index 0000000000..05fb5bfeee --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/luke.xsl @@ -0,0 +1,337 @@ + + + + + + + + + Solr Luke Request Handler Response + + + + + + + + + <xsl:value-of select="$title"/> + + + + + +

        + +

        +
        + +
        + +

        Index Statistics

        + +
        + +

        Field Statistics

        + + + +

        Document statistics

        + + + + +
        + + + + + +
        + +
        + + +
        + +
        + +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + +
        +

        + +

        + +
        + +
        +
        +
        + + +
        + + 50 + 800 + 160 + blue + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
        + background-color: ; width: px; height: px; +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + +
        • + +
        • +
          +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + + + + + + + + + + + + + + + + +
        diff --git a/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl new file mode 100644 index 0000000000..a96e1d0244 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/release/solr/server/solr/solr.xml b/KeywordSearch/release/solr/server/solr/solr.xml new file mode 100644 index 0000000000..68b15ba011 --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/solr.xml @@ -0,0 +1,53 @@ + + + + + + + + + + ${host:} + ${jetty.port:8983} + ${hostContext:solr} + + ${genericCoreNodeNames:true} + + ${zkClientTimeout:30000} + ${distribUpdateSoTimeout:600000} + ${distribUpdateConnTimeout:60000} + ${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider} + ${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider} + + + + + ${socketTimeout:600000} + ${connTimeout:60000} + + + diff --git a/KeywordSearch/release/solr/server/solr/zoo.cfg b/KeywordSearch/release/solr/server/solr/zoo.cfg new file mode 100644 index 0000000000..aea451885e --- /dev/null +++ b/KeywordSearch/release/solr/server/solr/zoo.cfg @@ -0,0 +1,17 @@ +# The number of milliseconds of each tick +tickTime=2000 +# The number of ticks that the initial +# synchronization phase can take +initLimit=10 +# The number of ticks that can pass between +# sending a request and getting an acknowledgement +syncLimit=5 + +# the directory where the snapshot is stored. +# dataDir=/opt/zookeeper/data +# NOTE: Solr defaults the dataDir to /zoo_data + +# the port at which the clients will connect +# clientPort=2181 +# NOTE: Solr sets this based on zkRun / zkHost params + diff --git a/KeywordSearch/release/solr/server/start.jar b/KeywordSearch/release/solr/server/start.jar new file mode 100644 index 0000000000..a29eb40810 Binary files /dev/null and b/KeywordSearch/release/solr/server/start.jar differ diff --git a/KeywordSearch/release/solr/solr/conf/logging-development.properties b/KeywordSearch/release/solr/solr/conf/logging-development.properties deleted file mode 100644 index 34bb6c9b96..0000000000 --- a/KeywordSearch/release/solr/solr/conf/logging-development.properties +++ /dev/null @@ -1,4 +0,0 @@ -.level = INFO - -# Write to the console, we will forward it to a file determined at runtime -handlers = java.util.logging.ConsoleHandler \ No newline at end of file diff --git a/KeywordSearch/release/solr/solr/conf/logging-release.properties b/KeywordSearch/release/solr/solr/conf/logging-release.properties deleted file mode 100644 index 1aaff5afa2..0000000000 --- a/KeywordSearch/release/solr/solr/conf/logging-release.properties +++ /dev/null @@ -1,4 +0,0 @@ -.level = WARNING - -# Write to the console, we will forward it to a file determined at runtime -handlers = java.util.logging.ConsoleHandler \ No newline at end of file diff --git a/KeywordSearch/release/solr/solr/conf/schema.xml b/KeywordSearch/release/solr/solr/conf/schema.xml deleted file mode 100644 index a4ecdc0e10..0000000000 --- a/KeywordSearch/release/solr/solr/conf/schema.xml +++ /dev/null @@ -1,668 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - text - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/KeywordSearch/release/solr/solr/conf/spellings.txt b/KeywordSearch/release/solr/solr/conf/spellings.txt deleted file mode 100644 index 162a044d56..0000000000 --- a/KeywordSearch/release/solr/solr/conf/spellings.txt +++ /dev/null @@ -1,2 +0,0 @@ -pizza -history diff --git a/KeywordSearch/release/solr/solr/configsets/AutopsyConfig/conf/schema.xml b/KeywordSearch/release/solr/solr/configsets/AutopsyConfig/conf/schema.xml index fe219be69c..4fc0b632bc 100644 --- a/KeywordSearch/release/solr/solr/configsets/AutopsyConfig/conf/schema.xml +++ b/KeywordSearch/release/solr/solr/configsets/AutopsyConfig/conf/schema.xml @@ -45,7 +45,7 @@ that avoids logging every request --> - + @@ -151,11 +154,11 @@ value verbatim (and hence don't support range queries, since the lexicographic ordering isn't equal to the numeric ordering) --> - - - - - + + + + + - - - - + + + + @@ -233,7 +236,7 @@ - + @@ -257,7 +260,6 @@ @@ -273,7 +275,6 @@ @@ -310,7 +311,6 @@ @@ -323,7 +323,6 @@ @@ -354,7 +353,7 @@ - + @@ -362,7 +361,7 @@ - + @@ -561,6 +560,7 @@ also be useful for Lucene based queries containing special characters--> + - + + --> + + + + - LUCENE_40 + 6.2.1 native - - - false - + application/json - + application/csv @@ -1072,12 +1061,12 @@ startup="lazy" /> - +